1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, pythonOlder 6, eventlet 7, gevent 8, pytestCheckHook 9, setuptools 10}: 11 12buildPythonPackage rec { 13 pname = "gunicorn"; 14 version = "20.1.0"; 15 disabled = pythonOlder "3.5"; 16 17 src = fetchFromGitHub { 18 owner = "benoitc"; 19 repo = "gunicorn"; 20 rev = version; 21 sha256 = "sha256-xdNHm8NQWlAlflxof4cz37EoM74xbWrNaf6jlwwzHv4="; 22 }; 23 24 patches = [ 25 (fetchpatch { 26 # fix eventlet 0.30.3+ compability 27 url = "https://github.com/benoitc/gunicorn/commit/6a8ebb4844b2f28596ffe7421eb9f7d08c8dc4d8.patch"; 28 sha256 = "sha256-+iApgohzPZ/cHTGBNb7XkqLaHOVVPF26BnPUsvISoZw="; 29 }) 30 ]; 31 32 postPatch = '' 33 substituteInPlace setup.cfg \ 34 --replace "--cov=gunicorn --cov-report=xml" "" 35 ''; 36 37 propagatedBuildInputs = [ 38 setuptools 39 ]; 40 41 checkInputs = [ 42 eventlet 43 gevent 44 pytestCheckHook 45 ]; 46 47 pythonImportsCheck = [ "gunicorn" ]; 48 49 meta = with lib; { 50 homepage = "https://github.com/benoitc/gunicorn"; 51 description = "gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications"; 52 license = licenses.mit; 53 maintainers = with maintainers; [ SuperSandro2000 ]; 54 }; 55}