Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / bellows / default.nix
blob38c938bb742472338dec4b5d4f2500cfac8787a1
1 { lib
2 , async-timeout
3 , buildPythonPackage
4 , click
5 , click-log
6 , fetchFromGitHub
7 , fetchpatch2
8 , pure-pcapy3
9 , pyserial-asyncio
10 , pytest-asyncio
11 , pytest-timeout
12 , pytestCheckHook
13 , pythonOlder
14 , setuptools
15 , voluptuous
16 , zigpy
19 buildPythonPackage rec {
20   pname = "bellows";
21   version = "0.38.1";
22   pyproject = true;
24   disabled = pythonOlder "3.8";
26   src = fetchFromGitHub {
27     owner = "zigpy";
28     repo = "bellows";
29     rev = "refs/tags/${version}";
30     hash = "sha256-oxPzjDb+FdHeHsgeGKH3SVvKb0vCB9dIhT7lGzhDcBw=";
31   };
33   patches = [
34     (fetchpatch2 {
35       url = "https://github.com/zigpy/bellows/commit/7833647083f27f55b7ad345f4aaa7dffaa369abc.patch";
36       hash = "sha256-v+BOPqikWoyNtZ1qRWe3RwraG6nQnfZqoV6yj9PpGX8=";
37     })
38   ];
40   postPatch = ''
41     substituteInPlace pyproject.toml \
42       --replace-fail '"setuptools-git-versioning<2"' "" \
43       --replace-fail 'dynamic = ["version"]' 'version = "${version}"'
44   '';
46   build-system = [
47     setuptools
48   ];
50   dependencies = [
51     click
52     click-log
53     pure-pcapy3
54     pyserial-asyncio
55     voluptuous
56     zigpy
57   ] ++ lib.optionals (pythonOlder "3.11") [
58     async-timeout
59   ];
61   nativeCheckInputs = [
62     pytestCheckHook
63     pytest-asyncio
64     pytest-timeout
65   ];
67   pythonImportsCheck = [
68     "bellows"
69   ];
71   meta = with lib; {
72     description = "Python module to implement EZSP for EmberZNet devices";
73     homepage = "https://github.com/zigpy/bellows";
74     changelog = "https://github.com/zigpy/bellows/releases/tag/${version}";
75     license = licenses.gpl3Plus;
76     maintainers = with maintainers; [ mvnetbiz ];
77     mainProgram = "bellows";
78   };