blob: c947beafd19b62202552eabe2248b133498efa64 (
plain)
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
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
click,
click-log,
paho-mqtt,
pyaml,
}:
buildPythonPackage (finalAttrs: {
pname = "bch";
version = "1.2.1";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "hardwario";
repo = "bch-control-tool";
tag = "v${finalAttrs.version}";
hash = "sha256-/C+NbJ0RrWZ/scv/FiRBTh4h7u0xS4mHVDWQ0WwmlEY=";
};
build-system = [ setuptools ];
dependencies = [
click
click-log
paho-mqtt
pyaml
];
postPatch = ''
substituteInPlace bch/cli.py setup.py \
--replace-fail "@@VERSION@@" "${finalAttrs.version}"
'';
pythonImportsCheck = [ "bch" ];
meta = {
homepage = "https://github.com/hardwario/bch-control-tool";
description = "HARDWARIO Hub Control Tool";
mainProgram = "bch";
platforms = lib.platforms.linux;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ cynerd ];
};
})
|