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.17.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-wq+Gtt2oW8koxOqu3z8G3XvHo6Ur+FhWPe+KslDG754=";
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 ] ++ lib.flatten (builtins.attrValues optional-dependencies);
59
60 pythonImportsCheck = [ "nibe" ];
61
62 meta = with lib; {
63 description = "Library for the communication with Nibe heatpumps";
64 homepage = "https://github.com/yozik04/nibe";
65 changelog = "https://github.com/yozik04/nibe/releases/tag/${version}";
66 license = licenses.gpl3Plus;
67 maintainers = with maintainers; [ fab ];
68 };
69}