1{ lib
2, buildPythonPackage
3, cryptography
4, fetchFromGitHub
5, poetry
6, pytest-aiohttp
7, pytestCheckHook
8, pythonAtLeast
9, zeroconf
10}:
11
12buildPythonPackage rec {
13 pname = "aiohomekit";
14 version = "0.2.62";
15 format = "pyproject";
16 disabled = pythonAtLeast "3.9";
17
18 src = fetchFromGitHub {
19 owner = "Jc2k";
20 repo = pname;
21 rev = version;
22 sha256 = "sha256-01IzeR0iukPTkz8I7h93wZkgjz6flRAJN8unEX6d+cs=";
23 };
24
25 nativeBuildInputs = [ poetry ];
26
27 propagatedBuildInputs = [
28 cryptography
29 zeroconf
30 ];
31
32 checkInputs = [
33 pytest-aiohttp
34 pytestCheckHook
35 ];
36
37 # Some test requires network access
38 disabledTests = [
39 "test_remove_pairing"
40 "test_pair"
41 "test_add_and_remove_pairings"
42 ];
43
44 pythonImportsCheck = [ "aiohomekit" ];
45
46 meta = with lib; {
47 description = "Python module that implements the HomeKit protocol";
48 longDescription = ''
49 This Python library implements the HomeKit protocol for controlling
50 Homekit accessories.
51 '';
52 homepage = "https://github.com/Jc2k/aiohomekit";
53 license = with licenses; [ asl20 ];
54 maintainers = with maintainers; [ fab ];
55 };
56}