diff --git a/pkgs/development/python-modules/aioopenssl/default.nix b/pkgs/development/python-modules/aioopenssl/default.nix index b69ba513263f..cb6336de2438 100644 --- a/pkgs/development/python-modules/aioopenssl/default.nix +++ b/pkgs/development/python-modules/aioopenssl/default.nix @@ -3,6 +3,7 @@ stdenv, buildPythonPackage, fetchFromGitHub, + fetchpatch, # build-system setuptools, @@ -34,6 +35,15 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; + patches = [ + # compatibility with python3.14: set a asyncio event loop for the unit tetsts + (fetchpatch { + name = "fix-asyncio-event-loop.patch"; + url = "https://github.com/theobori/aioopenssl/commit/47b1a1e5593fd8c3f4dedcdbc68c17e83d5c88ec.patch"; + hash = "sha256-XdoeWS5wqmGDWRObVpjcRLyN7SF2IdVmSAUBD7U4dfI="; + }) + ]; + # Tests that fail in when built in the Darwin sandbox. disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ # address already in use