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:
Martin Weinelt
2021-09-18 03:51:40 +02:00
parent 10f8ee55fe
commit ba21a7bc10
4 changed files with 28 additions and 8 deletions
@@ -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 ([