Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyrainbird / default.nix
blob7a4e86c8dd1f3946a5eb1007e62caded782bf3dd
1 { lib
2 , aiohttp-retry
3 , buildPythonPackage
4 , fetchFromGitHub
5 , freezegun
6 , ical
7 , parameterized
8 , pycryptodome
9 , pydantic
10 , pytest-aiohttp
11 , pytest-asyncio
12 , pytest-golden
13 , pytest-mock
14 , pytestCheckHook
15 , python-dateutil
16 , pythonOlder
17 , pyyaml
18 , requests
19 , requests-mock
20 , responses
23 buildPythonPackage rec {
24   pname = "pyrainbird";
25   version = "4.0.0";
26   format = "setuptools";
28   disabled = pythonOlder "3.10";
30   src = fetchFromGitHub {
31     owner = "allenporter";
32     repo = pname;
33     rev = "refs/tags/${version}";
34     hash = "sha256-VwcYyD9JtLDU2Bgp2hlptDz3vPoX4revTRKTA8OkWEw=";
35   };
37   postPatch = ''
38     substituteInPlace pytest.ini \
39       --replace "--cov=pyrainbird --cov-report=term-missing" ""
41     substituteInPlace setup.cfg \
42       --replace "pycryptodome>=3.16.0" "pycryptodome"
43   '';
45   propagatedBuildInputs = [
46     aiohttp-retry
47     ical
48     pycryptodome
49     pydantic
50     python-dateutil
51     pyyaml
52     requests
53   ];
55   __darwinAllowLocalNetworking = true;
57   nativeCheckInputs = [
58     freezegun
59     parameterized
60     pytest-aiohttp
61     pytest-asyncio
62     pytest-golden
63     pytest-mock
64     pytestCheckHook
65     requests-mock
66     responses
67   ];
69   pythonImportsCheck = [
70     "pyrainbird"
71   ];
73   meta = with lib; {
74     description = "Module to interact with Rainbird controllers";
75     homepage = "https://github.com/allenporter/pyrainbird";
76     changelog = "https://github.com/allenporter/pyrainbird/releases/tag/${version}";
77     license = with licenses; [ mit ];
78     maintainers = with maintainers; [ fab ];
79   };