diff --git a/pkgs/development/python-modules/hap-python/default.nix b/pkgs/development/python-modules/hap-python/default.nix index 0b2b5e24aa5c..b9b23ac771e1 100644 --- a/pkgs/development/python-modules/hap-python/default.nix +++ b/pkgs/development/python-modules/hap-python/default.nix @@ -1,8 +1,7 @@ { lib, - async-timeout, - buildPythonPackage, base36, + buildPythonPackage, chacha20poly1305-reuseable, cryptography, fetchFromGitHub, @@ -12,12 +11,13 @@ pytest-asyncio, pytest-timeout, pytestCheckHook, + pythonAtLeast, pythonOlder, setuptools, zeroconf, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "hap-python"; version = "5.0.0"; pyproject = true; @@ -25,7 +25,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "ikalchev"; repo = "HAP-python"; - tag = version; + tag = finalAttrs.version; hash = "sha256-+EhxoO5X/ANGh008WE0sJeBsu8SRnuds3hXGxNWpKnk="; }; @@ -37,9 +37,6 @@ buildPythonPackage rec { h11 orjson zeroconf - ] - ++ lib.optionals (pythonOlder "3.11") [ - async-timeout ]; optional-dependencies.QRCode = [ @@ -52,15 +49,20 @@ buildPythonPackage rec { pytest-timeout pytestCheckHook ] - ++ optional-dependencies.QRCode; + ++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies); pythonImportsCheck = [ "pyhap" ]; + disabledTests = lib.optionals (pythonAtLeast "3.14") [ + # https://github.com/ikalchev/HAP-python/issues/490 + "test_start_from_sync" + ]; + meta = { description = "HomeKit Accessory Protocol implementation"; homepage = "https://github.com/ikalchev/HAP-python"; - changelog = "https://github.com/ikalchev/HAP-python/blob/${src.tag}/CHANGELOG.md"; + changelog = "https://github.com/ikalchev/HAP-python/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ oro ]; }; -} +})