summary refs log tree commit diff
path: root/pkgs/development/python-modules/ansible/core.nix
diff options
context:
space:
mode:
authorTheodore Ni <3806110+tjni@users.noreply.github.com>2023-06-30 16:19:49 -0700
committerTheodore Ni <3806110+tjni@users.noreply.github.com>2023-07-09 07:56:33 -0700
commitd45387899136ccb498be4bf5e414c1dc75e5cd57 (patch)
tree1884fe7b6ddad6df5a123eaca0466ab162d30517 /pkgs/development/python-modules/ansible/core.nix
parent9365015778fd8d85d74cffad2edac9b951b54486 (diff)
downloadnixpkgs-d45387899136ccb498be4bf5e414c1dc75e5cd57.tar
nixpkgs-d45387899136ccb498be4bf5e414c1dc75e5cd57.tar.gz
nixpkgs-d45387899136ccb498be4bf5e414c1dc75e5cd57.tar.bz2
nixpkgs-d45387899136ccb498be4bf5e414c1dc75e5cd57.tar.lz
nixpkgs-d45387899136ccb498be4bf5e414c1dc75e5cd57.tar.xz
nixpkgs-d45387899136ccb498be4bf5e414c1dc75e5cd57.tar.zst
nixpkgs-d45387899136ccb498be4bf5e414c1dc75e5cd57.zip
python39Packages.ansible-core: add importlib-resources to python 3.9 build
Diffstat (limited to 'pkgs/development/python-modules/ansible/core.nix')
-rw-r--r--pkgs/development/python-modules/ansible/core.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/ansible/core.nix b/pkgs/development/python-modules/ansible/core.nix
index 50c67f8f290..4e95959127e 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