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";
|
2021-06-18 22:47:21 +01:00
|
|
|
version = "20.1.0";
|
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;
|
2021-06-18 22:47:21 +01:00
|
|
|
sha256 = "e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8";
|
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;
|
|
|
|
};
|
|
|
|
}
|