ansible, ansible_2_10: internalize collections package
This drops the python3Packages.ansible-collections attribute in favor of a local callPackage that overwrites the collections package per ansible version. (cherry picked from commit ca618d6401631cf2c82c81220c54e774b514297f)
This commit is contained in:
parent
10f8ee55fe
commit
ba21a7bc10
@ -1,8 +1,8 @@
|
|||||||
{ lib
|
{ lib
|
||||||
|
, callPackage
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, ansible-collections
|
|
||||||
, cryptography
|
, cryptography
|
||||||
, jinja2
|
, jinja2
|
||||||
, junit-xml
|
, junit-xml
|
||||||
@ -20,6 +20,12 @@
|
|||||||
, xmltodict
|
, xmltodict
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
ansible-collections = callPackage ./collections.nix {
|
||||||
|
version = "3.4.0"; # must be < 4.0
|
||||||
|
sha256 = "096rbgz730njk0pg8qnc27mmz110wqrw354ca9gasb7rqg0f4d6a";
|
||||||
|
};
|
||||||
|
in
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "ansible-base";
|
pname = "ansible-base";
|
||||||
version = "2.10.11";
|
version = "2.10.11";
|
||||||
@ -69,6 +75,10 @@ buildPythonPackage rec {
|
|||||||
# internal import errors, missing dependencies
|
# internal import errors, missing dependencies
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
collections = ansible-collections;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Radically simple IT automation";
|
description = "Radically simple IT automation";
|
||||||
homepage = "https://www.ansible.com";
|
homepage = "https://www.ansible.com";
|
||||||
|
@ -14,21 +14,23 @@
|
|||||||
, xmltodict
|
, xmltodict
|
||||||
, withJunos ? false
|
, withJunos ? false
|
||||||
, withNetbox ? false
|
, withNetbox ? false
|
||||||
|
|
||||||
|
, version
|
||||||
|
, sha256
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "ansible";
|
pname = "ansible";
|
||||||
version = "3.4.0";
|
inherit version;
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version sha256;
|
||||||
sha256 = "096rbgz730njk0pg8qnc27mmz110wqrw354ca9gasb7rqg0f4d6a";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# make ansible-base depend on ansible-collection, not the other way around
|
# 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 ([
|
propagatedBuildInputs = lib.unique ([
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{ lib
|
{ lib
|
||||||
|
, callPackage
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, ansible-collections
|
|
||||||
, cryptography
|
, cryptography
|
||||||
, jinja2
|
, jinja2
|
||||||
, junit-xml
|
, junit-xml
|
||||||
@ -21,6 +21,12 @@
|
|||||||
, xmltodict
|
, xmltodict
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
ansible-collections = callPackage ./collections.nix {
|
||||||
|
version = "4.1.0";
|
||||||
|
sha256 = "0rrivq1g0vizah8zmf012lzig2xxfk5x1371k16s3nn4zfkwqqgm";
|
||||||
|
};
|
||||||
|
in
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "ansible-core";
|
pname = "ansible-core";
|
||||||
version = "2.11.2";
|
version = "2.11.2";
|
||||||
@ -74,6 +80,10 @@ buildPythonPackage rec {
|
|||||||
# internal import errors, missing dependencies
|
# internal import errors, missing dependencies
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
collections = ansible-collections;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Radically simple IT automation";
|
description = "Radically simple IT automation";
|
||||||
homepage = "https://www.ansible.com";
|
homepage = "https://www.ansible.com";
|
||||||
|
@ -415,8 +415,6 @@ in {
|
|||||||
|
|
||||||
ansible-base = callPackage ../development/python-modules/ansible/base.nix { };
|
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-core = callPackage ../development/python-modules/ansible/core.nix { };
|
||||||
|
|
||||||
ansible-kernel = callPackage ../development/python-modules/ansible-kernel { };
|
ansible-kernel = callPackage ../development/python-modules/ansible-kernel { };
|
||||||
|
Loading…
Reference in New Issue
Block a user