From d45387899136ccb498be4bf5e414c1dc75e5cd57 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Fri, 30 Jun 2023 16:19:49 -0700 Subject: [PATCH] python39Packages.ansible-core: add importlib-resources to python 3.9 build --- pkgs/development/python-modules/ansible/core.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/ansible/core.nix b/pkgs/development/python-modules/ansible/core.nix index 50c67f8f2908..4e95959127e2 100644 --- a/pkgs/development/python-modules/ansible/core.nix +++ b/pkgs/development/python-modules/ansible/core.nix @@ -1,9 +1,12 @@ { lib , buildPythonPackage , fetchPypi +, pythonOlder +, pythonRelaxDepsHook , installShellFiles , ansible , cryptography +, importlib-resources , jinja2 , junit-xml , lxml @@ -41,6 +44,8 @@ buildPythonPackage rec { nativeBuildInputs = [ installShellFiles + ] ++ lib.optionals (pythonOlder "3.10") [ + pythonRelaxDepsHook ]; propagatedBuildInputs = [ @@ -64,7 +69,15 @@ buildPythonPackage rec { requests scp xmltodict - ] ++ lib.optional windowsSupport pywinrm; + ] ++ lib.optionals windowsSupport [ + pywinrm + ] ++ lib.optionals (pythonOlder "3.10") [ + importlib-resources + ]; + + pythonRelaxDeps = lib.optionals (pythonOlder "3.10") [ + "importlib-resources" + ]; postInstall = '' installManPage docs/man/man1/*.1