1{ lib
2, aiohttp
3, buildPythonPackage
4, fetchFromGitHub
5, freezegun
6, orjson
7, pydevccu
8, pytest-aiohttp
9, pytestCheckHook
10, python-slugify
11, pythonOlder
12, setuptools
13, voluptuous
14, websocket-client
15, xmltodict
16, wheel
17}:
18
19buildPythonPackage rec {
20 pname = "hahomematic";
21 version = "2023.11.1";
22 format = "pyproject";
23
24 disabled = pythonOlder "3.11";
25
26 src = fetchFromGitHub {
27 owner = "danielperna84";
28 repo = pname;
29 rev = "refs/tags/${version}";
30 hash = "sha256-C8KznmR3+G38MLQj6Sek7qW9R9yJr8gfcjgNjDyXG7I=";
31 };
32
33 postPatch = ''
34 substituteInPlace pyproject.toml \
35 --replace "setuptools~=68.2" "setuptools" \
36 --replace "wheel~=0.41.2" "wheel"
37 '';
38
39 nativeBuildInputs = [
40 setuptools
41 wheel
42 ];
43
44 propagatedBuildInputs = [
45 aiohttp
46 orjson
47 python-slugify
48 voluptuous
49 ];
50
51 nativeCheckInputs = [
52 freezegun
53 pydevccu
54 pytest-aiohttp
55 pytestCheckHook
56 ];
57
58 pythonImportsCheck = [
59 "hahomematic"
60 ];
61
62 meta = with lib; {
63 description = "Python module to interact with HomeMatic devices";
64 homepage = "https://github.com/danielperna84/hahomematic";
65 changelog = "https://github.com/danielperna84/hahomematic/releases/tag/${version}";
66 license = with licenses; [ mit ];
67 maintainers = with maintainers; [ fab ];
68 };
69}