1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, cython 5, setuptools 6, pytestCheckHook 7}: 8 9buildPythonPackage rec { 10 pname = "http-parser"; 11 version = "0.9.0"; 12 format = "pyproject"; 13 14 src = fetchFromGitHub { 15 owner = "benoitc"; 16 repo = pname; 17 rev = "refs/tags/${version}"; 18 hash = "sha256-WHimvSaNcncwzLwwk5+ZNg7BbHF+hPr39SfidEDYfhU="; 19 }; 20 21 nativeBuildInputs = [ 22 cython 23 setuptools 24 ]; 25 26 preBuild = '' 27 # re-run cython 28 make -B 29 ''; 30 31 pythonImportsCheck = [ 32 "http_parser" 33 ]; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 ]; 38 39 meta = with lib; { 40 description = "HTTP request/response parser for python in C"; 41 homepage = "https://github.com/benoitc/http-parser"; 42 license = licenses.mit; 43 maintainers = with maintainers; [ hexa ]; 44 }; 45}