From da455116d2166b03d798cad602d70a6e1a95d104 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 12 Jun 2018 20:21:24 +0200 Subject: [PATCH] python.pkgs.greenlet: move expression --- .../python-modules/greenlet/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 25 +-------------- 2 files changed, 32 insertions(+), 24 deletions(-) create mode 100644 pkgs/development/python-modules/greenlet/default.nix diff --git a/pkgs/development/python-modules/greenlet/default.nix b/pkgs/development/python-modules/greenlet/default.nix new file mode 100644 index 000000000000..e309f754b890 --- /dev/null +++ b/pkgs/development/python-modules/greenlet/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchPypi +, six +, isPyPy +}: + + +buildPythonPackage rec { + pname = "greenlet"; + version = "0.4.10"; + disabled = isPyPy; # builtin for pypy + + src = fetchPypi { + inherit pname version; + sha256 = "c4417624aa88380cdf0fe110a8a6e0dbcc26f80887197fe5df0427dfa348ae62"; + }; + + propagatedBuildInputs = [ six ]; + + # see https://github.com/python-greenlet/greenlet/issues/85 + preCheck = '' + rm tests/test_leaks.py + ''; + + meta = { + homepage = https://pypi.python.org/pypi/greenlet; + description = "Module for lightweight in-process concurrent programming"; + license = lib.licenses.lgpl2; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5a58901b2a18..7547e54af4a5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6236,30 +6236,7 @@ in { grammalecte = callPackage ../development/python-modules/grammalecte { }; - greenlet = buildPythonPackage rec { - name = "greenlet-${version}"; - version = "0.4.10"; - disabled = isPyPy; # builtin for pypy - - src = pkgs.fetchurl { - url = "mirror://pypi/g/greenlet/${name}.tar.gz"; - sha256 = "c4417624aa88380cdf0fe110a8a6e0dbcc26f80887197fe5df0427dfa348ae62"; - }; - - propagatedBuildInputs = with self; [ six ]; - - # see https://github.com/python-greenlet/greenlet/issues/85 - preCheck = '' - rm tests/test_leaks.py - ''; - - meta = { - homepage = https://pypi.python.org/pypi/greenlet; - description = "Module for lightweight in-process concurrent programming"; - license = licenses.lgpl2; - platforms = platforms.all; - }; - }; + greenlet = callPackage ../development/python-modules/greenlet { }; grib-api = disabledIf (!isPy27) (toPythonModule (pkgs.grib-api.override {