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