diff options
Diffstat (limited to 'pkgs/development/python-modules/http-parser/default.nix')
-rw-r--r-- | pkgs/development/python-modules/http-parser/default.nix | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/http-parser/default.nix b/pkgs/development/python-modules/http-parser/default.nix index 05cd4397dbf93..7e53465939f28 100644 --- a/pkgs/development/python-modules/http-parser/default.nix +++ b/pkgs/development/python-modules/http-parser/default.nix @@ -1,9 +1,11 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, cython -, setuptools -, pytestCheckHook +{ + lib, + buildPythonPackage, + fetchFromGitHub, + cython, + setuptools, + pytestCheckHook, + fetchpatch, }: buildPythonPackage rec { @@ -28,18 +30,24 @@ buildPythonPackage rec { make -B ''; - pythonImportsCheck = [ - "http_parser" - ]; + pythonImportsCheck = [ "http_parser" ]; - nativeCheckInputs = [ - pytestCheckHook + # The imp module is deprecated since version 3.4, and was removed in 3.12 + # https://docs.python.org/3.11/library/imp.html + # Fix from: https://github.com/benoitc/http-parser/pull/101/ + patches = [ + (fetchpatch { + url = "https://github.com/benoitc/http-parser/commit/4d4984ce129253f9de475bfd3c683301c916e8b1.patch"; + hash = "sha256-d3k1X41/D9PpPWsDety2AiYyLv9LJIhpkOo3a6qKcB8="; + }) ]; - meta = with lib; { + nativeCheckInputs = [ pytestCheckHook ]; + + meta = { description = "HTTP request/response parser for python in C"; homepage = "https://github.com/benoitc/http-parser"; - license = licenses.mit; - maintainers = with maintainers; [ ]; + license = lib.licenses.mit; + maintainers = [ ]; }; } |