Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / zigpy / default.nix
blob0a32dea6649a1ac259d07dcda0c77ee0f60cfb9d
1 { lib
2 , aiohttp
3 , aioresponses
4 , aiosqlite
5 , async-timeout
6 , attrs
7 , buildPythonPackage
8 , crccheck
9 , cryptography
10 , fetchFromGitHub
11 , freezegun
12 , importlib-resources
13 , jsonschema
14 , pycryptodome
15 , pyserial-asyncio
16 , pytest-asyncio
17 , pytest-timeout
18 , pytestCheckHook
19 , pythonOlder
20 , setuptools
21 , typing-extensions
22 , voluptuous
25 buildPythonPackage rec {
26   pname = "zigpy";
27   version = "0.63.5";
28   pyproject = true;
30   disabled = pythonOlder "3.8";
32   src = fetchFromGitHub {
33     owner = "zigpy";
34     repo = "zigpy";
35     rev = "refs/tags/${version}";
36     hash = "sha256-iZxHXxheyoA5vo0Pxojs7QE8rSyTpsYpJ6/OzDSZJ20=";
37   };
39   postPatch = ''
40     substituteInPlace pyproject.toml \
41       --replace-fail '"setuptools-git-versioning<2"' "" \
42       --replace-fail 'dynamic = ["version"]' 'version = "${version}"'
43   '';
45   build-system = [
46     setuptools
47   ];
49   dependencies = [
50     attrs
51     aiohttp
52     aiosqlite
53     crccheck
54     cryptography
55     jsonschema
56     pyserial-asyncio
57     typing-extensions
58     pycryptodome
59     voluptuous
60   ] ++ lib.optionals (pythonOlder "3.9") [
61     importlib-resources
62   ] ++ lib.optionals (pythonOlder "3.11") [
63     async-timeout
64   ];
66   nativeCheckInputs = [
67     aioresponses
68     freezegun
69     pytest-asyncio
70     pytest-timeout
71     pytestCheckHook
72   ];
74   disabledTests = [
75     # # Our two manual scans succeeded and the periodic one was attempted
76     # assert len(mock_scan.mock_calls) == 3
77     # AssertionError: assert 4 == 3
78     "test_periodic_scan_priority"
79   ];
81   disabledTestPaths = [
82     # Tests require network access
83     "tests/ota/test_ota_providers.py"
84   ];
86   pythonImportsCheck = [
87     "zigpy.application"
88     "zigpy.config"
89     "zigpy.exceptions"
90     "zigpy.types"
91     "zigpy.zcl"
92   ];
94   meta = with lib; {
95     description = "Library implementing a ZigBee stack";
96     homepage = "https://github.com/zigpy/zigpy";
97     changelog = "https://github.com/zigpy/zigpy/releases/tag/${version}";
98     license = licenses.gpl3Plus;
99     maintainers = with maintainers; [ mvnetbiz ];
100     platforms = platforms.linux;
101   };