1{ lib 2, buildPythonPackage 3, base36 4, chacha20poly1305-reuseable 5, cryptography 6, fetchFromGitHub 7, h11 8, orjson 9, pyqrcode 10, pytest-asyncio 11, pytest-timeout 12, pytestCheckHook 13, pythonOlder 14, zeroconf 15}: 16 17buildPythonPackage rec { 18 pname = "hap-python"; 19 version = "4.5.0"; 20 format = "setuptools"; 21 disabled = pythonOlder "3.6"; 22 23 src = fetchFromGitHub { 24 owner = "ikalchev"; 25 repo = "HAP-python"; 26 rev = "refs/tags/v${version}"; 27 sha256 = "sha256-/XJvCL9hMIrOUwGPcrvSrJ6SZ/E6BQy+isFFlAniIM4="; 28 }; 29 30 propagatedBuildInputs = [ 31 chacha20poly1305-reuseable 32 cryptography 33 h11 34 orjson 35 zeroconf 36 ]; 37 38 passthru.optional-dependencies.QRCode = [ 39 base36 40 pyqrcode 41 ]; 42 43 checkInputs = [ 44 pytest-asyncio 45 pytest-timeout 46 pytestCheckHook 47 ] 48 ++ passthru.optional-dependencies.QRCode; 49 50 disabledTestPaths = [ 51 # Disable tests requiring network access 52 "tests/test_accessory_driver.py" 53 "tests/test_hap_handler.py" 54 "tests/test_hap_protocol.py" 55 ]; 56 57 disabledTests = [ 58 "test_persist_and_load" 59 "test_we_can_connect" 60 "test_idle_connection_cleanup" 61 "test_we_can_start_stop" 62 "test_push_event" 63 "test_bridge_run_stop" 64 "test_migration_to_include_client_properties" 65 ]; 66 67 pythonImportsCheck = [ "pyhap" ]; 68 69 meta = with lib; { 70 homepage = "https://github.com/ikalchev/HAP-python"; 71 description = "HomeKit Accessory Protocol implementation in python"; 72 license = licenses.asl20; 73 maintainers = with maintainers; [ oro ]; 74 }; 75}