1{ lib
2, async-timeout
3, buildPythonPackage
4, coloredlogs
5, fetchFromGitHub
6, jsonschema
7, pytest-asyncio
8, pytest-mock
9, pytest-timeout
10, pytest-xdist
11, pytestCheckHook
12, pythonOlder
13, voluptuous
14, zigpy
15}:
16
17buildPythonPackage rec {
18 pname = "zigpy-znp";
19 version = "0.11.1";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "zigpy";
26 repo = pname;
27 rev = "refs/tags/v${version}";
28 hash = "sha256-gYzk3XHXlF4+lnrRHYS5RB2QD0oDHgnMov9UFmXder8=";
29 };
30
31 postPatch = ''
32 substituteInPlace pyproject.toml \
33 --replace "timeout = 20" "timeout = 300"
34 '';
35
36 propagatedBuildInputs = [
37 async-timeout
38 coloredlogs
39 jsonschema
40 voluptuous
41 zigpy
42 ];
43
44 nativeCheckInputs = [
45 pytest-asyncio
46 pytest-mock
47 pytest-timeout
48 pytest-xdist
49 pytestCheckHook
50 ];
51
52 disabledTests = [
53 # https://github.com/zigpy/zigpy-znp/issues/209
54 "test_join_device"
55 "test_permit_join"
56 "test_request_recovery_route_rediscovery_af"
57 "test_request_recovery_route_rediscovery_zdo"
58 "test_zigpy_request"
59 "test_zigpy_request_failure"
60 "test_mgmt_nwk_update_req"
61 ];
62
63 pythonImportsCheck = [
64 "zigpy_znp"
65 ];
66
67 meta = with lib; {
68 description = "Library for zigpy which communicates with TI ZNP radios";
69 homepage = "https://github.com/zigpy/zigpy-znp";
70 changelog = "https://github.com/zigpy/zigpy-znp/releases/tag/v${version}";
71 license = licenses.gpl3Plus;
72 maintainers = with maintainers; [ mvnetbiz ];
73 platforms = platforms.linux;
74 };
75}