diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2021-05-14 16:32:43 +1000 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2021-05-14 16:32:43 +1000 |
commit | 004f8cd986ca6e8bcad1a71419f6a53bd89fed73 (patch) | |
tree | 0818ebbec8b74ffe1e933325f45311bc935a0f44 /pkgs/development/python-modules/ansible/collections.nix | |
parent | 76c58493d78d5f06ed62e0b8309f223232dfc309 (diff) | |
parent | bfb5f4cc5e5c0914eb2cafe082d9521904025b43 (diff) | |
download | nixpkgs-004f8cd986ca6e8bcad1a71419f6a53bd89fed73.tar nixpkgs-004f8cd986ca6e8bcad1a71419f6a53bd89fed73.tar.gz nixpkgs-004f8cd986ca6e8bcad1a71419f6a53bd89fed73.tar.bz2 nixpkgs-004f8cd986ca6e8bcad1a71419f6a53bd89fed73.tar.lz nixpkgs-004f8cd986ca6e8bcad1a71419f6a53bd89fed73.tar.xz nixpkgs-004f8cd986ca6e8bcad1a71419f6a53bd89fed73.tar.zst nixpkgs-004f8cd986ca6e8bcad1a71419f6a53bd89fed73.zip |
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/python-modules/ansible/collections.nix')
-rw-r--r-- | pkgs/development/python-modules/ansible/collections.nix | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/ansible/collections.nix b/pkgs/development/python-modules/ansible/collections.nix new file mode 100644 index 00000000000..52355142e26 --- /dev/null +++ b/pkgs/development/python-modules/ansible/collections.nix @@ -0,0 +1,77 @@ +{ lib +, buildPythonPackage +, fetchPypi +, ansible-base +, jsonschema +, jxmlease +, ncclient +, netaddr +, paramiko +, pynetbox +, scp +, textfsm +, ttp +, xmltodict +, withJunos ? false +, withNetbox ? false +}: + +buildPythonPackage rec { + pname = "ansible"; + version = "3.4.0"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + sha256 = "096rbgz730njk0pg8qnc27mmz110wqrw354ca9gasb7rqg0f4d6a"; + }; + + postPatch = '' + # make ansible-base depend on ansible-collection, not the other way around + sed -i '/ansible-base/d' setup.py + ''; + + propagatedBuildInputs = lib.unique ([ + # Support ansible collections by default, make all others optional + # ansible.netcommon + jxmlease + ncclient + netaddr + paramiko + xmltodict + # ansible.posix + # ansible.utils + jsonschema + textfsm + ttp + xmltodict + # ansible.windows + + # lots of collections with dedicated requirements.txt and pyproject.toml files, + # add the dependencies for the collections you need conditionally and install + # ansible using overrides to enable the collections you need. + ] ++ lib.optionals (withJunos) [ + # ansible_collections/junipernetworks/junos/requirements.txt + jxmlease + ncclient + paramiko + scp + xmltodict + ] ++ lib.optionals (withNetbox) [ + # ansible_collections/netbox/netbox/pyproject.toml + pynetbox + ]); + + # don't try and fail to strip 48000+ non strippable files, it takes >5 minutes! + dontStrip = true; + + # difficult to test + doCheck = false; + + meta = with lib; { + description = "Radically simple IT automation"; + homepage = "Radically simple IT automation"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ hexa ]; + }; +} |