1{
2 lib,
3 buildPythonPackage,
4 aiocoap,
5 aiohappyeyeballs,
6 async-interrupt,
7 bleak,
8 bleak-retry-connector,
9 chacha20poly1305,
10 chacha20poly1305-reuseable,
11 commentjson,
12 cryptography,
13 fetchFromGitHub,
14 orjson,
15 poetry-core,
16 pytest-aiohttp,
17 pytestCheckHook,
18 pythonOlder,
19 zeroconf,
20}:
21
22buildPythonPackage rec {
23 pname = "aiohomekit";
24 version = "3.2.14";
25 pyproject = true;
26
27 disabled = pythonOlder "3.10";
28
29 src = fetchFromGitHub {
30 owner = "Jc2k";
31 repo = "aiohomekit";
32 tag = version;
33 hash = "sha256-TP5YW4pIWO0xHV1EY5hDa80MrBOvkZLyQTNP7m0x+AU=";
34 };
35
36 build-system = [ poetry-core ];
37
38 dependencies = [
39 aiocoap
40 aiohappyeyeballs
41 async-interrupt
42 bleak
43 bleak-retry-connector
44 chacha20poly1305
45 chacha20poly1305-reuseable
46 commentjson
47 cryptography
48 orjson
49 zeroconf
50 ];
51
52 nativeCheckInputs = [
53 pytest-aiohttp
54 pytestCheckHook
55 ];
56
57 disabledTestPaths = [
58 # Tests require network access
59 "tests/test_ip_pairing.py"
60 ];
61
62 pythonImportsCheck = [ "aiohomekit" ];
63
64 meta = with lib; {
65 description = "Python module that implements the HomeKit protocol";
66 longDescription = ''
67 This Python library implements the HomeKit protocol for controlling
68 Homekit accessories.
69 '';
70 homepage = "https://github.com/Jc2k/aiohomekit";
71 changelog = "https://github.com/Jc2k/aiohomekit/releases/tag/${src.tag}";
72 license = licenses.asl20;
73 maintainers = with maintainers; [ fab ];
74 mainProgram = "aiohomekitctl";
75 };
76}