Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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.6.0"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.6"; 23 24 src = fetchFromGitHub { 25 owner = "ikalchev"; 26 repo = "HAP-python"; 27 rev = "refs/tags/v${version}"; 28 hash = "sha256-fAJB1gk8zTS/mW5KzWr3z26qctZc/EQlk//WM1Xwpl0="; 29 }; 30 31 propagatedBuildInputs = [ 32 chacha20poly1305-reuseable 33 cryptography 34 h11 35 orjson 36 zeroconf 37 ]; 38 39 passthru.optional-dependencies.QRCode = [ 40 base36 41 pyqrcode 42 ]; 43 44 nativeCheckInputs = [ 45 pytest-asyncio 46 pytest-timeout 47 pytestCheckHook 48 ] 49 ++ passthru.optional-dependencies.QRCode; 50 51 disabledTestPaths = [ 52 # Disable tests requiring network access 53 "tests/test_accessory_driver.py" 54 "tests/test_hap_handler.py" 55 "tests/test_hap_protocol.py" 56 ]; 57 58 disabledTests = [ 59 "test_persist_and_load" 60 "test_we_can_connect" 61 "test_idle_connection_cleanup" 62 "test_we_can_start_stop" 63 "test_push_event" 64 "test_bridge_run_stop" 65 "test_migration_to_include_client_properties" 66 ]; 67 68 pythonImportsCheck = [ 69 "pyhap" 70 ]; 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/v${version}/CHANGELOG.md"; 76 license = licenses.asl20; 77 maintainers = with maintainers; [ oro ]; 78 }; 79}