btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / development / python-modules / kiss-headers / default.nix
blobe7e52dacd187fbd461358b4933bc0835708788b4
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   hatchling,
6   requests,
7   pytestCheckHook,
8 }:
10 buildPythonPackage rec {
11   pname = "kiss-headers";
12   version = "2.4.3";
13   pyproject = true;
15   src = fetchFromGitHub {
16     owner = "Ousret";
17     repo = pname;
18     rev = "refs/tags/${version}";
19     hash = "sha256-WeAzlC1yT+0nPSuB278z8T0XvPjbre051f/Rva5ujAk=";
20   };
22   nativeBuildInputs = [ hatchling ];
24   propagatedBuildInputs = [ requests ];
26   nativeCheckInputs = [ pytestCheckHook ];
28   postPatch = ''
29     substituteInPlace pyproject.toml \
30       --replace-fail "--cov=kiss_headers --doctest-modules --cov-report=term-missing -rxXs" "--doctest-modules -rxXs"
31   '';
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   ];
40   pythonImportsCheck = [ "kiss_headers" ];
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   };