nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 buildPythonPackage,
3 coloredlogs,
4 fetchFromGitHub,
5 fetchpatch,
6 jsonschema,
7 lib,
8 pytest-asyncio_0,
9 pytest-mock,
10 pytestCheckHook,
11 setuptools,
12 voluptuous,
13 zigpy,
14}:
15
16buildPythonPackage rec {
17 pname = "zigpy-zboss";
18 version = "1.2.0";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "kardia-as";
23 repo = "zigpy-zboss";
24 tag = "v${version}";
25 hash = "sha256-T2R291GeFIsnDRI1tAydTlLamA3LF5tKxKFhPtcEUus=";
26 };
27
28 patches = [
29 # https://github.com/kardia-as/zigpy-zboss/pull/66
30 (fetchpatch {
31 name = "replace-async-timeout-with-asyncio-timeout.patch";
32 url = "https://github.com/kardia-as/zigpy-zboss/commit/91688873ddbcd0c2196f0da69a857b2e2bec75a6.patch";
33 excludes = [ "setup.cfg" ];
34 hash = "sha256-aC0+FbbtuHDW3ApJDnTG3TUeNWhzecEYVuiSOik03uU=";
35 })
36 (fetchpatch {
37 # https://github.com/kardia-as/zigpy-zboss/pull/67
38 name = "replace-pyserial-asyncio-with-pyserial-asyncio-fast.patch";
39 url = "https://github.com/kardia-as/zigpy-zboss/commit/d44ceb537dc16ce020f8c60a0ff35e88672f3455.patch";
40 hash = "sha256-aXWRtBLDr9NLIMNK/xtsYuy/hEB2zHU3YYcRKbguTTo=";
41 })
42 ];
43
44 pythonRemoveDeps = [ "async_timeout" ];
45
46 build-system = [ setuptools ];
47
48 dependencies = [
49 coloredlogs
50 jsonschema
51 voluptuous
52 zigpy
53 ];
54
55 pythonImportsCheck = [ "zigpy_zboss" ];
56
57 nativeCheckInputs = [
58 pytest-asyncio_0
59 pytest-mock
60 pytestCheckHook
61 ];
62
63 disabledTestPaths = [
64 # AttributeError: 'Ledvance' object has no attribute 'get'
65 "tests/application/test_connect.py"
66 "tests/application/test_join.py"
67 "tests/application/test_requests.py"
68 "tests/application/test_startup.py"
69 "tests/application/test_zdo_requests.py"
70 "tests/application/test_zigpy_callbacks.py"
71 ];
72
73 meta = {
74 changelog = "https://github.com/kardia-as/zigpy-zboss/releases/tag/v${version}";
75 description = "Library for zigpy which communicates with Nordic nRF52 radios";
76 homepage = "https://github.com/kardia-as/zigpy-zboss";
77 license = lib.licenses.gpl3Plus;
78 maintainers = with lib.maintainers; [ dotlambda ];
79 };
80}