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