1{ lib
2, asynctest
3, buildPythonPackage
4, fetchFromGitHub
5, pyserial
6, pyserial-asyncio
7, pytest-asyncio
8, pytestCheckHook
9, pythonOlder
10, zigpy
11}:
12
13buildPythonPackage rec {
14 pname = "zigpy-cc";
15 version = "0.5.2";
16 format = "setuptools";
17
18 # https://github.com/Martiusweb/asynctest/issues/152
19 # broken by upstream python bug with asynctest and
20 # is used exclusively by home-assistant with python 3.8
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "zigpy";
25 repo = "zigpy-cc";
26 rev = version;
27 sha256 = "U3S8tQ3zPlexZDt5GvCd+rOv7CBVeXJJM1NGe7nRl2o=";
28 };
29
30 propagatedBuildInputs = [
31 pyserial-asyncio
32 zigpy
33 ];
34
35 doCheck = pythonOlder "3.11"; # asynctest is unsupported on python3.11
36
37 nativeCheckInputs = [
38 asynctest
39 pytest-asyncio
40 pytestCheckHook
41 ];
42
43 disabledTests = [
44 "test_incoming_msg"
45 "test_incoming_msg2"
46 "test_deser"
47 # Fails in sandbox
48 "tests/test_application.py "
49 ];
50
51 pythonImportsCheck = [
52 "zigpy_cc"
53 ];
54
55 meta = with lib; {
56 description = "Library which communicates with Texas Instruments CC2531 radios for zigpy";
57 homepage = "https://github.com/zigpy/zigpy-cc";
58 license = licenses.gpl3Plus;
59 maintainers = with maintainers; [ mvnetbiz ];
60 platforms = platforms.linux;
61 };
62}