1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 poetry-core,
8
9 # dependencies
10 aiohttp,
11
12 # tests
13 aioresponses,
14 pytest-aiohttp,
15 pytestCheckHook,
16}:
17
18buildPythonPackage rec {
19 pname = "dio-chacon-wifi-api";
20 version = "1.2.2";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "cnico";
25 repo = "dio-chacon-wifi-api";
26 tag = "v${version}";
27 hash = "sha256-YlomB3/EBX2tFifjcF38q+sr2z1bHwUjmqyNE2wTp90=";
28 };
29
30 build-system = [ poetry-core ];
31
32 dependencies = [ aiohttp ];
33
34 nativeCheckInputs = [
35 aioresponses
36 pytest-aiohttp
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [ "dio_chacon_wifi_api" ];
41
42 meta = with lib; {
43 description = "Python API via wifi for DIO devices from Chacon. Useful for homeassistant or other automations";
44 homepage = "https://github.com/cnico/dio-chacon-wifi-api";
45 license = licenses.gpl3Only;
46 maintainers = with maintainers; [ hexa ];
47 };
48}