1{
2 lib,
3 aresponses,
4 async-modbus,
5 async-timeout,
6 asyncclick,
7 buildPythonPackage,
8 construct,
9 exceptiongroup,
10 fetchFromGitHub,
11 pandas,
12 pytest-asyncio,
13 pytestCheckHook,
14 python-slugify,
15 pythonOlder,
16 setuptools,
17 tenacity,
18}:
19
20buildPythonPackage rec {
21 pname = "nibe";
22 version = "2.19.0";
23 pyproject = true;
24
25 disabled = pythonOlder "3.9";
26
27 src = fetchFromGitHub {
28 owner = "yozik04";
29 repo = "nibe";
30 tag = version;
31 hash = "sha256-1Awf/7AUSsLo9O2GrVvdlHm5Fcj2CQ7TdKY152bogfQ=";
32 };
33
34 pythonRelaxDeps = [ "async-modbus" ];
35
36 build-system = [ setuptools ];
37
38 dependencies = [
39 async-modbus
40 async-timeout
41 construct
42 exceptiongroup
43 tenacity
44 ];
45
46 optional-dependencies = {
47 convert = [
48 pandas
49 python-slugify
50 ];
51 cli = [ asyncclick ];
52 };
53
54 nativeCheckInputs = [
55 aresponses
56 pytest-asyncio
57 pytestCheckHook
58 ]
59 ++ lib.flatten (builtins.attrValues optional-dependencies);
60
61 pythonImportsCheck = [ "nibe" ];
62
63 meta = with lib; {
64 description = "Library for the communication with Nibe heatpumps";
65 homepage = "https://github.com/yozik04/nibe";
66 changelog = "https://github.com/yozik04/nibe/releases/tag/${version}";
67 license = licenses.gpl3Plus;
68 maintainers = with maintainers; [ fab ];
69 };
70}