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