1{ lib, buildPythonPackage, fetchPypi, isPy27
2, coverage
3, mock
4, pytest
5, pytest-cov
6, setuptools
7}:
8
9buildPythonPackage rec {
10 pname = "gunicorn";
11 version = "20.1.0";
12 disabled = isPy27;
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8";
17 };
18
19 propagatedBuildInputs = [ setuptools ];
20
21 checkInputs = [ pytest mock pytest-cov coverage ];
22
23 prePatch = ''
24 substituteInPlace requirements_test.txt --replace "==" ">=" \
25 --replace "coverage>=4.0,<4.4" "coverage"
26 '';
27
28 # better than no tests
29 checkPhase = ''
30 $out/bin/gunicorn --help > /dev/null
31 '';
32
33 pythonImportsCheck = [ "gunicorn" ];
34
35 meta = with lib; {
36 homepage = "https://github.com/benoitc/gunicorn";
37 description = "WSGI HTTP Server for UNIX";
38 license = licenses.mit;
39 };
40}