1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 click,
6 click-log,
7 paho-mqtt,
8 pyaml,
9}:
10
11buildPythonPackage rec {
12 pname = "bch";
13 version = "1.2.1";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "hardwario";
18 repo = "bch-control-tool";
19 rev = "v${version}";
20 sha256 = "/C+NbJ0RrWZ/scv/FiRBTh4h7u0xS4mHVDWQ0WwmlEY=";
21 };
22
23 propagatedBuildInputs = [
24 click
25 click-log
26 paho-mqtt
27 pyaml
28 ];
29
30 postPatch = ''
31 sed -ri 's/@@VERSION@@/${version}/g' \
32 bch/cli.py setup.py
33 '';
34
35 pythonImportsCheck = [ "bch" ];
36
37 meta = with lib; {
38 homepage = "https://github.com/hardwario/bch-control-tool";
39 description = "HARDWARIO Hub Control Tool";
40 mainProgram = "bch";
41 platforms = platforms.linux;
42 license = licenses.mit;
43 maintainers = with maintainers; [ cynerd ];
44 };
45}