diff --git a/pkgs/development/python-modules/ansible/base.nix b/pkgs/development/python-modules/ansible/base.nix index 06f53423219..0a5cc01d929 100644 --- a/pkgs/development/python-modules/ansible/base.nix +++ b/pkgs/development/python-modules/ansible/base.nix @@ -1,8 +1,8 @@ { lib +, callPackage , buildPythonPackage , fetchPypi , installShellFiles -, ansible-collections , cryptography , jinja2 , junit-xml @@ -20,6 +20,12 @@ , xmltodict }: +let + ansible-collections = callPackage ./collections.nix { + version = "3.4.0"; # must be < 4.0 + sha256 = "096rbgz730njk0pg8qnc27mmz110wqrw354ca9gasb7rqg0f4d6a"; + }; +in buildPythonPackage rec { pname = "ansible-base"; version = "2.10.11"; @@ -69,6 +75,10 @@ buildPythonPackage rec { # internal import errors, missing dependencies doCheck = false; + passthru = { + collections = ansible-collections; + }; + meta = with lib; { description = "Radically simple IT automation"; homepage = "https://www.ansible.com"; diff --git a/pkgs/development/python-modules/ansible/collections.nix b/pkgs/development/python-modules/ansible/collections.nix index 9547b9a0918..05aa0b2b294 100644 --- a/pkgs/development/python-modules/ansible/collections.nix +++ b/pkgs/development/python-modules/ansible/collections.nix @@ -14,21 +14,23 @@ , xmltodict , withJunos ? false , withNetbox ? false + +, version +, sha256 }: buildPythonPackage rec { pname = "ansible"; - version = "3.4.0"; + inherit version; format = "setuptools"; src = fetchPypi { - inherit pname version; - sha256 = "096rbgz730njk0pg8qnc27mmz110wqrw354ca9gasb7rqg0f4d6a"; + inherit pname version sha256; }; postPatch = '' # make ansible-base depend on ansible-collection, not the other way around - sed -i '/ansible-base/d' setup.py + sed -Ei '/ansible-(base|core)/d' setup.py ''; propagatedBuildInputs = lib.unique ([ diff --git a/pkgs/development/python-modules/ansible/core.nix b/pkgs/development/python-modules/ansible/core.nix index 45ce2b8778a..4dd606c9adb 100644 --- a/pkgs/development/python-modules/ansible/core.nix +++ b/pkgs/development/python-modules/ansible/core.nix @@ -1,8 +1,8 @@ { lib +, callPackage , buildPythonPackage , fetchPypi , installShellFiles -, ansible-collections , cryptography , jinja2 , junit-xml @@ -21,6 +21,12 @@ , xmltodict }: +let + ansible-collections = callPackage ./collections.nix { + version = "4.1.0"; + sha256 = "0rrivq1g0vizah8zmf012lzig2xxfk5x1371k16s3nn4zfkwqqgm"; + }; +in buildPythonPackage rec { pname = "ansible-core"; version = "2.11.2"; @@ -74,6 +80,10 @@ buildPythonPackage rec { # internal import errors, missing dependencies doCheck = false; + passthru = { + collections = ansible-collections; + }; + meta = with lib; { description = "Radically simple IT automation"; homepage = "https://www.ansible.com"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5b189058c73..6b9878b363d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -415,8 +415,6 @@ in { ansible-base = callPackage ../development/python-modules/ansible/base.nix { }; - ansible-collections = callPackage ../development/python-modules/ansible/collections.nix { }; - ansible-core = callPackage ../development/python-modules/ansible/core.nix { }; ansible-kernel = callPackage ../development/python-modules/ansible-kernel { };