Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchPypi, 4 buildPythonPackage, 5 isPyPy, 6 python, 7 libev, 8 cffi, 9 cython, 10 greenlet, 11 importlib-metadata, 12 setuptools, 13 wheel, 14 zope-event, 15 zope-interface, 16 pythonOlder, 17 c-ares, 18 libuv, 19 20 # for passthru.tests 21 dulwich, 22 gunicorn, 23 opentracing, 24 pika, 25}: 26 27buildPythonPackage rec { 28 pname = "gevent"; 29 version = "24.2.1"; 30 format = "pyproject"; 31 32 disabled = pythonOlder "3.7"; 33 34 src = fetchPypi { 35 inherit pname version; 36 hash = "sha256-Qy/Hb2gKz3zxiMLuD106tztjwfAxFMfNijTOu+WqIFY="; 37 }; 38 39 nativeBuildInputs = [ 40 cython 41 setuptools 42 wheel 43 ] ++ lib.optionals (!isPyPy) [ cffi ]; 44 45 buildInputs = [ 46 libev 47 libuv 48 c-ares 49 ]; 50 51 propagatedBuildInputs = [ 52 importlib-metadata 53 zope-event 54 zope-interface 55 ] ++ lib.optionals (!isPyPy) [ greenlet ]; 56 57 # Bunch of failures. 58 doCheck = false; 59 60 pythonImportsCheck = [ 61 "gevent" 62 "gevent.events" 63 ]; 64 65 passthru.tests = { 66 inherit 67 dulwich 68 gunicorn 69 opentracing 70 pika 71 ; 72 } // lib.filterAttrs (k: v: lib.hasInfix "gevent" k) python.pkgs; 73 74 GEVENTSETUP_EMBED = "0"; 75 76 meta = with lib; { 77 description = "Coroutine-based networking library"; 78 homepage = "http://www.gevent.org/"; 79 license = licenses.mit; 80 maintainers = with maintainers; [ bjornfor ]; 81 platforms = platforms.unix; 82 }; 83}