From 3c991104a0d29bbdb5c79cc10a8be8dc95952fae Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sat, 31 Mar 2018 18:21:14 +0200 Subject: [PATCH] pythonPackages.cjson: Move to own file --- .../python-modules/cjson/default.nix | 18 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +----------------- 2 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/cjson/default.nix diff --git a/pkgs/development/python-modules/cjson/default.nix b/pkgs/development/python-modules/cjson/default.nix new file mode 100644 index 00000000000..60f38e4e090 --- /dev/null +++ b/pkgs/development/python-modules/cjson/default.nix @@ -0,0 +1,18 @@ +{ stdenv, buildPythonPackage, fetchPypi, isPy3k, isPyPy }: + +buildPythonPackage rec { + pname = "python-cjson"; + version = "1.1.0"; + disabled = isPy3k || isPyPy; + + src = fetchPypi { + inherit pname version; + sha256 = "1cz87pd411h1fj5am99i19jp53yizcz9mkg1a7cc6a1pb6vsn7x0"; + }; + + meta = with stdenv.lib; { + description = "A very fast JSON encoder/decoder for Python"; + homepage = http://ag-projects.com/; + license = licenses.lgpl2; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6d970abc6ac..c5dd913d738 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1532,23 +1532,7 @@ in { cherrypy = callPackage ../development/python-modules/cherrypy {}; - cjson = buildPythonPackage rec { - name = "python-cjson-${version}"; - version = "1.1.0"; - disabled = isPy3k || isPyPy; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/python-cjson/${name}.tar.gz"; - sha256 = "a01fabb7593728c3d851e1cd9a3efbd18f72650a31a5aa8a74018640da3de8b3"; - }; - - meta = { - description = "A very fast JSON encoder/decoder for Python"; - homepage = "http://ag-projects.com/"; - license = licenses.lgpl2; - platforms = platforms.all; - }; - }; + cjson = callPackage ../development/python-modules/cjson { }; cld2-cffi = callPackage ../development/python-modules/cld2-cffi {};