nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

gunicorn: add 19.x branch for python2.7 support

The nixos/moinmoin module uses gunicorn, however the 20.0 version
dropped python2 support which broke the module as there's no python3
port planned for moinmoin: http://moinmo.in/Python3

authored by

Martin Milata and committed by
Jon
b86f4d52 524af32c

+43 -1
+39
pkgs/development/python-modules/gunicorn/19.nix
··· 1 + { stdenv, buildPythonPackage, fetchPypi 2 + , coverage 3 + , mock 4 + , pytest 5 + , pytestcov 6 + , setuptools 7 + }: 8 + 9 + buildPythonPackage 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 stdenv.lib; { 35 + homepage = "https://github.com/benoitc/gunicorn"; 36 + description = "WSGI HTTP Server for UNIX"; 37 + license = licenses.mit; 38 + }; 39 + }
+4 -1
pkgs/top-level/python-packages.nix
··· 3802 3802 3803 3803 rebulk = callPackage ../development/python-modules/rebulk { }; 3804 3804 3805 - gunicorn = callPackage ../development/python-modules/gunicorn { }; 3805 + gunicorn = if isPy27 then 3806 + callPackage ../development/python-modules/gunicorn/19.nix { } 3807 + else 3808 + callPackage ../development/python-modules/gunicorn { }; 3806 3809 3807 3810 hawkauthlib = callPackage ../development/python-modules/hawkauthlib { }; 3808 3811