1{ lib, buildPythonPackage, fetchFromGitHub, requests, pytestCheckHook }:
2
3buildPythonPackage rec {
4 pname = "kiss-headers";
5 version = "2.3.1";
6 format = "setuptools";
7
8 src = fetchFromGitHub {
9 owner = "Ousret";
10 repo = pname;
11 rev = "refs/tags/${version}";
12 hash = "sha256-xPjw/uJTmvmQZDrI3i1KTUeAZuDF1mc13hvFBl8Erh0=";
13 };
14
15 propagatedBuildInputs = [ requests ];
16
17 nativeCheckInputs = [ pytestCheckHook ];
18
19 postPatch = ''
20 substituteInPlace setup.cfg \
21 --replace "--cov=kiss_headers --doctest-modules --cov-report=term-missing -rxXs" "--doctest-modules -rxXs"
22 '';
23
24 disabledTestPaths = [
25 # Tests require internet access
26 "kiss_headers/__init__.py"
27 "tests/test_serializer.py"
28 "tests/test_with_http_request.py"
29 ];
30
31 pythonImportsCheck = [ "kiss_headers" ];
32
33 meta = with lib; {
34 description = "Python package for HTTP/1.1 style headers";
35 homepage = "https://github.com/Ousret/kiss-headers";
36 license = licenses.mit;
37 maintainers = with maintainers; [ wolfangaukang ];
38 };
39}