at master 1.7 kB view raw
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.1"; 23 pyproject = true; 24 25 src = fetchFromGitHub { 26 owner = "zigpy"; 27 repo = "zigpy-znp"; 28 tag = "v${version}"; 29 hash = "sha256-V662zDUBMbr+cARxrwt8196Ml4zlGEAudR3BtvY96HM="; 30 }; 31 32 postPatch = '' 33 substituteInPlace pyproject.toml \ 34 --replace-fail "timeout = 20" "timeout = 300" \ 35 --replace-fail ', "setuptools-git-versioning<2"' "" \ 36 --replace-fail 'dynamic = ["version"]' 'version = "${version}"' 37 ''; 38 39 build-system = [ setuptools ]; 40 41 dependencies = [ 42 coloredlogs 43 jsonschema 44 voluptuous 45 zigpy 46 ] 47 ++ lib.optionals (pythonOlder "3.11") [ 48 async-timeout 49 ]; 50 51 nativeCheckInputs = [ 52 pytest-asyncio 53 pytest-mock 54 pytest-rerunfailures 55 pytest-timeout 56 pytest-xdist 57 pytestCheckHook 58 ]; 59 60 pytestFlags = [ "--reruns=3" ]; 61 62 disabledTests = [ 63 # broken by https://github.com/zigpy/zigpy/pull/1635 64 "test_concurrency_auto_config" 65 "test_request_concurrency" 66 ]; 67 68 pythonImportsCheck = [ "zigpy_znp" ]; 69 70 meta = with lib; { 71 description = "Library for zigpy which communicates with TI ZNP radios"; 72 homepage = "https://github.com/zigpy/zigpy-znp"; 73 changelog = "https://github.com/zigpy/zigpy-znp/releases/tag/v${version}"; 74 license = licenses.gpl3Plus; 75 maintainers = with maintainers; [ mvnetbiz ]; 76 platforms = platforms.linux; 77 }; 78}