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