2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy27
|
2019-11-25 21:22:02 +00:00
|
|
|
, coverage
|
|
|
|
, mock
|
|
|
|
, pytest
|
|
|
|
, pytestcov
|
|
|
|
, setuptools
|
|
|
|
}:
|
2017-01-13 23:08:19 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-05-27 10:25:35 +01:00
|
|
|
pname = "gunicorn";
|
2019-12-19 19:31:13 +00:00
|
|
|
version = "20.0.4";
|
2019-12-22 19:39:53 +00:00
|
|
|
disabled = isPy27;
|
2017-01-13 23:08:19 +00:00
|
|
|
|
2018-06-22 11:04:17 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-12-19 19:31:13 +00:00
|
|
|
sha256 = "1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626";
|
2017-01-13 23:08:19 +00:00
|
|
|
};
|
|
|
|
|
2019-11-25 21:22:02 +00:00
|
|
|
propagatedBuildInputs = [ setuptools ];
|
|
|
|
|
2018-06-22 11:04:17 +01:00
|
|
|
checkInputs = [ pytest mock pytestcov coverage ];
|
2017-01-13 23:08:19 +00:00
|
|
|
|
|
|
|
prePatch = ''
|
2018-06-22 11:04:17 +01:00
|
|
|
substituteInPlace requirements_test.txt --replace "==" ">=" \
|
|
|
|
--replace "coverage>=4.0,<4.4" "coverage"
|
2017-01-13 23:08:19 +00:00
|
|
|
'';
|
|
|
|
|
2019-11-25 21:22:02 +00:00
|
|
|
# better than no tests
|
|
|
|
checkPhase = ''
|
|
|
|
$out/bin/gunicorn --help > /dev/null
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "gunicorn" ];
|
2019-08-18 10:35:14 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-02-11 03:27:45 +00:00
|
|
|
homepage = "https://github.com/benoitc/gunicorn";
|
2017-01-13 23:08:19 +00:00
|
|
|
description = "WSGI HTTP Server for UNIX";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|