1{
2 lib,
3 aiohttp,
4 aresponses,
5 async-timeout,
6 awesomeversion,
7 backoff,
8 buildPythonPackage,
9 deepmerge,
10 fetchFromGitHub,
11 poetry-core,
12 pytest-asyncio,
13 pytestCheckHook,
14 pythonOlder,
15 yarl,
16}:
17
18buildPythonPackage rec {
19 pname = "pyipp";
20 version = "0.16.0";
21 pyproject = true;
22
23 disabled = pythonOlder "3.9";
24
25 src = fetchFromGitHub {
26 owner = "ctalkington";
27 repo = "python-ipp";
28 rev = "refs/tags/${version}";
29 hash = "sha256-ddI9K0lJDZbVgO+hptP4I+EH//5vOoFDYXWxGALF8Ik=";
30 };
31
32 postPatch = ''
33 substituteInPlace pyproject.toml \
34 --replace-fail 'version = "0.0.0"' 'version = "${version}"' \
35 --replace-fail "--cov" ""
36 '';
37
38 build-system = [ poetry-core ];
39
40 dependencies = [
41 aiohttp
42 awesomeversion
43 backoff
44 deepmerge
45 yarl
46 ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ];
47
48 nativeCheckInputs = [
49 aresponses
50 pytest-asyncio
51 pytestCheckHook
52 ];
53
54 __darwinAllowLocalNetworking = true;
55
56 pythonImportsCheck = [ "pyipp" ];
57
58 meta = with lib; {
59 changelog = "https://github.com/ctalkington/python-ipp/releases/tag/${version}";
60 description = "Asynchronous Python client for Internet Printing Protocol (IPP)";
61 homepage = "https://github.com/ctalkington/python-ipp";
62 license = licenses.mit;
63 maintainers = with maintainers; [ hexa ];
64 };
65}