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