Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 hatchling, 6 requests, 7 pytestCheckHook, 8}: 9 10buildPythonPackage rec { 11 pname = "kiss-headers"; 12 version = "2.4.3"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "Ousret"; 17 repo = pname; 18 rev = "refs/tags/${version}"; 19 hash = "sha256-WeAzlC1yT+0nPSuB278z8T0XvPjbre051f/Rva5ujAk="; 20 }; 21 22 nativeBuildInputs = [ hatchling ]; 23 24 propagatedBuildInputs = [ requests ]; 25 26 nativeCheckInputs = [ pytestCheckHook ]; 27 28 postPatch = '' 29 substituteInPlace pyproject.toml \ 30 --replace-fail "--cov=kiss_headers --doctest-modules --cov-report=term-missing -rxXs" "--doctest-modules -rxXs" 31 ''; 32 33 disabledTestPaths = [ 34 # Tests require internet access 35 "kiss_headers/__init__.py" 36 "tests/test_serializer.py" 37 "tests/test_with_http_request.py" 38 ]; 39 40 pythonImportsCheck = [ "kiss_headers" ]; 41 42 meta = with lib; { 43 description = "Python package for HTTP/1.1 style headers"; 44 homepage = "https://github.com/Ousret/kiss-headers"; 45 license = licenses.mit; 46 maintainers = [ ]; 47 }; 48}