From 9e76c950a70f0482abe10b9a34ce43edfae5031a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 29 Oct 2017 14:51:29 +0100 Subject: [PATCH] pythonPackages.gevent: move to python-modules/ --- .../python-modules/gevent/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 35 +----------------- 2 files changed, 37 insertions(+), 34 deletions(-) create mode 100644 pkgs/development/python-modules/gevent/default.nix diff --git a/pkgs/development/python-modules/gevent/default.nix b/pkgs/development/python-modules/gevent/default.nix new file mode 100644 index 00000000000..8a3d3b3d09b --- /dev/null +++ b/pkgs/development/python-modules/gevent/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, buildPythonPackage, isPyPy, python, libev, greenlet }: + +buildPythonPackage rec { + name = "gevent-1.1.2"; + + src = fetchurl { + url = "mirror://pypi/g/gevent/${name}.tar.gz"; + sha256 = "cb15cf73d69a2eeefed330858f09634e2c50bf46da9f9e7635730fcfb872c02c"; + }; + + # Why do we have this patch? + postPatch = '' + substituteInPlace libev/ev.c --replace \ + "ecb_inline void ecb_unreachable (void) ecb_noreturn" \ + "ecb_inline ecb_noreturn void ecb_unreachable (void)" + ''; + + buildInputs = [ libev ]; + propagatedBuildInputs = stdenv.lib.optionals (!isPyPy) [ greenlet ]; + + checkPhase = '' + cd greentest + ${python.interpreter} testrunner.py + ''; + + # Bunch of failures. + doCheck = false; + + meta = with stdenv.lib; { + description = "Coroutine-based networking library"; + homepage = http://www.gevent.org/; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with maintainers; [ bjornfor ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 02b4239349c..625dfba69aa 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9445,40 +9445,7 @@ in { }; }; - gevent = buildPythonPackage rec { - name = "gevent-1.1.2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/g/gevent/${name}.tar.gz"; - sha256 = "cb15cf73d69a2eeefed330858f09634e2c50bf46da9f9e7635730fcfb872c02c"; - }; - - # Why do we have this patch? - postPatch = '' - substituteInPlace libev/ev.c --replace \ - "ecb_inline void ecb_unreachable (void) ecb_noreturn" \ - "ecb_inline ecb_noreturn void ecb_unreachable (void)" - ''; - - buildInputs = with self; [ pkgs.libev ]; - propagatedBuildInputs = with self; optionals (!isPyPy) [ greenlet ]; - - checkPhase = '' - cd greentest - ${python.interpreter} testrunner.py - ''; - - # Bunch of failures. - doCheck = false; - - meta = { - description = "Coroutine-based networking library"; - homepage = http://www.gevent.org/; - license = licenses.mit; - platforms = platforms.unix; - maintainers = with maintainers; [ bjornfor ]; - }; - }; + gevent = callPackage ../development/python-modules/gevent { }; geventhttpclient = buildPythonPackage rec { name = "geventhttpclient-${version}";