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