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