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 setuptools, 17 zeroconf, 18}: 19 20buildPythonPackage rec { 21 pname = "hap-python"; 22 version = "4.9.2"; 23 pyproject = true; 24 25 disabled = pythonOlder "3.8"; 26 27 src = fetchFromGitHub { 28 owner = "ikalchev"; 29 repo = "HAP-python"; 30 tag = version; 31 hash = "sha256-mBjVUfNHuGSeLRisqu9ALpTDwpxHir+6X0scq+HrzxA="; 32 }; 33 34 build-system = [ setuptools ]; 35 36 dependencies = [ 37 async-timeout 38 chacha20poly1305-reuseable 39 cryptography 40 h11 41 orjson 42 zeroconf 43 ]; 44 45 optional-dependencies.QRCode = [ 46 base36 47 pyqrcode 48 ]; 49 50 nativeCheckInputs = [ 51 pytest-asyncio 52 pytest-timeout 53 pytestCheckHook 54 ] ++ optional-dependencies.QRCode; 55 56 disabledTestPaths = [ 57 # Disable tests requiring network access 58 "tests/test_accessory_driver.py" 59 "tests/test_hap_handler.py" 60 "tests/test_hap_protocol.py" 61 ]; 62 63 disabledTests = [ 64 "test_persist_and_load" 65 "test_we_can_connect" 66 "test_idle_connection_cleanup" 67 "test_we_can_start_stop" 68 "test_push_event" 69 "test_bridge_run_stop" 70 "test_migration_to_include_client_properties" 71 ]; 72 73 pythonImportsCheck = [ "pyhap" ]; 74 75 meta = with lib; { 76 description = "HomeKit Accessory Protocol implementation"; 77 homepage = "https://github.com/ikalchev/HAP-python"; 78 changelog = "https://github.com/ikalchev/HAP-python/blob/${version}/CHANGELOG.md"; 79 license = licenses.asl20; 80 maintainers = with maintainers; [ oro ]; 81 }; 82}