1{
2 lib,
3 aiohttp,
4 aresponses,
5 async-timeout,
6 backoff,
7 buildPythonPackage,
8 fetchFromGitHub,
9 multidict,
10 poetry-core,
11 pytest-asyncio,
12 pytestCheckHook,
13 pythonOlder,
14 syrupy,
15}:
16
17buildPythonPackage rec {
18 pname = "python-homewizard-energy";
19 version = "6.3.0";
20 pyproject = true;
21
22 disabled = pythonOlder "3.9";
23
24 src = fetchFromGitHub {
25 owner = "DCSBL";
26 repo = "python-homewizard-energy";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-etbYZKTNdlQCDc7LXir4D7LtRzYx9jhXZc1bJvsEb8E=";
29 };
30
31 postPatch = ''
32 substituteInPlace pyproject.toml \
33 --replace-fail 'version = "0.0.0"' 'version = "${version}"'
34 '';
35
36 build-system = [ poetry-core ];
37
38 dependencies = [
39 aiohttp
40 async-timeout
41 backoff
42 multidict
43 ];
44
45 __darwinAllowLocalNetworking = true;
46
47 nativeCheckInputs = [
48 aresponses
49 pytest-asyncio
50 pytestCheckHook
51 syrupy
52 ];
53
54 pythonImportsCheck = [ "homewizard_energy" ];
55
56 meta = with lib; {
57 description = "Library to communicate with HomeWizard Energy devices";
58 homepage = "https://github.com/homewizard/python-homewizard-energy";
59 changelog = "https://github.com/homewizard/python-homewizard-energy/releases/tag/v${version}";
60 license = licenses.asl20;
61 maintainers = with maintainers; [ fab ];
62 };
63}