1{ 2 lib, 3 async-timeout, 4 buildPythonPackage, 5 coloredlogs, 6 fetchFromGitHub, 7 jsonschema, 8 pytest-asyncio, 9 pytest-mock, 10 pytest-rerunfailures, 11 pytest-timeout, 12 pytest-xdist, 13 pytestCheckHook, 14 pythonOlder, 15 setuptools, 16 voluptuous, 17 zigpy, 18}: 19 20buildPythonPackage rec { 21 pname = "zigpy-znp"; 22 version = "0.14.0"; 23 pyproject = true; 24 25 disabled = pythonOlder "3.7"; 26 27 src = fetchFromGitHub { 28 owner = "zigpy"; 29 repo = pname; 30 tag = "v${version}"; 31 hash = "sha256-vYB04vEFqpqrjJMS73mtYXakp7lEIJjB+tT0SF9hpWM="; 32 }; 33 34 postPatch = '' 35 substituteInPlace pyproject.toml \ 36 --replace-fail "timeout = 20" "timeout = 300" \ 37 --replace-fail ', "setuptools-git-versioning<2"' "" \ 38 --replace-fail 'dynamic = ["version"]' 'version = "${version}"' 39 ''; 40 41 build-system = [ setuptools ]; 42 43 dependencies = [ 44 async-timeout 45 coloredlogs 46 jsonschema 47 voluptuous 48 zigpy 49 ]; 50 51 doCheck = false; # tests are not compatible with zigpy 0.65.3 52 53 nativeCheckInputs = [ 54 pytest-asyncio 55 pytest-mock 56 pytest-rerunfailures 57 pytest-timeout 58 pytest-xdist 59 pytestCheckHook 60 ]; 61 62 pytestFlagsArray = [ "--reruns=3" ]; 63 64 disabledTests = [ 65 # failing since zigpy 0.60.0 66 "test_join_device" 67 "test_nonstandard_profile" 68 "test_permit_join" 69 "test_request_recovery_route_rediscovery_zdo" 70 "test_watchdog" 71 "test_zigpy_request" 72 "test_zigpy_request_failure" 73 ]; 74 75 pythonImportsCheck = [ "zigpy_znp" ]; 76 77 meta = with lib; { 78 description = "Library for zigpy which communicates with TI ZNP radios"; 79 homepage = "https://github.com/zigpy/zigpy-znp"; 80 changelog = "https://github.com/zigpy/zigpy-znp/releases/tag/v${version}"; 81 license = licenses.gpl3Plus; 82 maintainers = with maintainers; [ mvnetbiz ]; 83 platforms = platforms.linux; 84 }; 85}