1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pyserial,
6 pyserial-asyncio,
7 pytest-asyncio,
8 pytestCheckHook,
9 setuptools,
10 zigpy,
11}:
12
13buildPythonPackage rec {
14 pname = "zigpy-deconz";
15 version = "0.25.2";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "zigpy";
20 repo = "zigpy-deconz";
21 tag = version;
22 hash = "sha256-9wsdL2mtT6Q6+4Z6f+Aoae7d0x7EDqkZ5n2O3Ml4PbA=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace-fail ', "setuptools-git-versioning<2"' "" \
28 --replace-fail 'dynamic = ["version"]' 'version = "${version}"'
29 '';
30
31 nativeBuildInputs = [ setuptools ];
32
33 propagatedBuildInputs = [
34 pyserial
35 pyserial-asyncio
36 zigpy
37 ];
38
39 nativeCheckInputs = [
40 pytest-asyncio
41 pytestCheckHook
42 ];
43
44 pythonImportsCheck = [ "zigpy_deconz" ];
45
46 meta = with lib; {
47 description = "Library which communicates with Deconz radios for zigpy";
48 homepage = "https://github.com/zigpy/zigpy-deconz";
49 changelog = "https://github.com/zigpy/zigpy-deconz/releases/tag/${src.tag}";
50 license = licenses.gpl3Plus;
51 maintainers = with maintainers; [ mvnetbiz ];
52 platforms = platforms.linux;
53 };
54}