nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, commentjson
4, cryptography
5, fetchFromGitHub
6, poetry-core
7, pytest-aiohttp
8, pytestCheckHook
9, pythonOlder
10, zeroconf
11}:
12
13buildPythonPackage rec {
14 pname = "aiohomekit";
15 version = "0.7.17";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "Jc2k";
22 repo = pname;
23 rev = "refs/tags/${version}";
24 sha256 = "sha256-vgRiqA3xNvuw3nIzl45RXdmcbDW6OTxvReSH5SVcNEs=";
25 };
26
27 nativeBuildInputs = [
28 poetry-core
29 ];
30
31 propagatedBuildInputs = [
32 commentjson
33 cryptography
34 zeroconf
35 ];
36
37 doCheck = lib.versionAtLeast pytest-aiohttp.version "1.0.0";
38
39 checkInputs = [
40 pytest-aiohttp
41 pytestCheckHook
42 ];
43
44 disabledTestPaths = [
45 # Tests require network access
46 "tests/test_ip_pairing.py"
47 ];
48
49 pythonImportsCheck = [
50 "aiohomekit"
51 ];
52
53 meta = with lib; {
54 description = "Python module that implements the HomeKit protocol";
55 longDescription = ''
56 This Python library implements the HomeKit protocol for controlling
57 Homekit accessories.
58 '';
59 homepage = "https://github.com/Jc2k/aiohomekit";
60 license = with licenses; [ asl20 ];
61 maintainers = with maintainers; [ fab ];
62 };
63}