1{
2 lib,
3 aiohttp-retry,
4 buildPythonPackage,
5 fetchFromGitHub,
6 freezegun,
7 ical,
8 mashumaro,
9 parameterized,
10 pycryptodome,
11 pytest-aiohttp,
12 pytest-asyncio,
13 pytest-golden,
14 pytest-mock,
15 pytestCheckHook,
16 python-dateutil,
17 pythonOlder,
18 pyyaml,
19 requests,
20 requests-mock,
21 responses,
22 setuptools,
23}:
24
25buildPythonPackage rec {
26 pname = "pyrainbird";
27 version = "6.0.2";
28 pyproject = true;
29
30 disabled = pythonOlder "3.10";
31
32 src = fetchFromGitHub {
33 owner = "allenporter";
34 repo = "pyrainbird";
35 rev = "refs/tags/${version}";
36 hash = "sha256-CcoZZ60PItqy0bCc36WfyNF9Fc28aHwQ6hhnY41lBNg=";
37 };
38
39 postPatch = ''
40 substituteInPlace pytest.ini \
41 --replace-fail "--cov=pyrainbird --cov-report=term-missing" ""
42 '';
43
44 build-system = [ setuptools ];
45
46 dependencies = [
47 aiohttp-retry
48 ical
49 mashumaro
50 pycryptodome
51 python-dateutil
52 pyyaml
53 requests
54 ];
55
56 __darwinAllowLocalNetworking = true;
57
58 nativeCheckInputs = [
59 freezegun
60 parameterized
61 pytest-aiohttp
62 pytest-asyncio
63 pytest-golden
64 pytest-mock
65 pytestCheckHook
66 requests-mock
67 responses
68 ];
69
70 pythonImportsCheck = [ "pyrainbird" ];
71
72 meta = with lib; {
73 description = "Module to interact with Rainbird controllers";
74 homepage = "https://github.com/allenporter/pyrainbird";
75 changelog = "https://github.com/allenporter/pyrainbird/releases/tag/${version}";
76 license = with licenses; [ mit ];
77 maintainers = with maintainers; [ fab ];
78 };
79}