1{
2 lib,
3 fetchFromGitHub,
4 python3,
5}:
6
7python3.pkgs.buildPythonApplication rec {
8 pname = "zigpy-cli";
9 version = "1.1.0";
10 pyproject = true;
11
12 src = fetchFromGitHub {
13 owner = "zigpy";
14 repo = "zigpy-cli";
15 tag = "v${version}";
16 hash = "sha256-X4sH2UOF0xHzjT1enohg7JKi+5lQ6wnJBIn09jK5Db8=";
17 };
18
19 postPatch = ''
20 substituteInPlace pyproject.toml \
21 --replace-fail '"setuptools-git-versioning<2"' "" \
22 --replace-fail 'dynamic = ["version"]' 'version = "${version}"'
23 '';
24
25 build-system = with python3.pkgs; [
26 setuptools
27 ];
28
29 dependencies = with python3.pkgs; [
30 bellows
31 click
32 coloredlogs
33 scapy
34 zigpy
35 zigpy-deconz
36 zigpy-xbee
37 zigpy-zboss
38 zigpy-zigate
39 zigpy-znp
40 ];
41
42 nativeCheckInputs = with python3.pkgs; [
43 freezegun
44 pytest-asyncio
45 pytest-timeout
46 pytestCheckHook
47 ];
48
49 pythonImportsCheck = [
50 "zigpy_cli"
51 ];
52
53 meta = with lib; {
54 description = "Command line interface for zigpy";
55 mainProgram = "zigpy";
56 homepage = "https://github.com/zigpy/zigpy-cli";
57 changelog = "https://github.com/zigpy/zigpy-cli/releases/tag/${src.tag}";
58 license = licenses.gpl3Plus;
59 maintainers = with maintainers; [ SuperSandro2000 ];
60 platforms = platforms.linux;
61 };
62}