3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/ansible/base.nix

79 lines
1.5 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchPypi
, installShellFiles
, ansible-collections
, cryptography
, jinja2
, junit-xml
, lxml
, ncclient
, packaging
, paramiko
, pexpect
, psutil
, pycrypto
, pyyaml
, requests
, scp
, windowsSupport ? false, pywinrm
, xmltodict
}:
buildPythonPackage rec {
pname = "ansible-base";
2021-06-10 00:37:30 +01:00
version = "2.10.10";
src = fetchPypi {
inherit pname version;
2021-06-10 00:37:30 +01:00
sha256 = "046ynyk9ldw35jbyw6jp0dmms735cd5i1f046f2lis8xv27bci3p";
};
# ansible_connection is already wrapped, so don't pass it through
# the python interpreter again, as it would break execution of
# connection plugins.
postPatch = ''
substituteInPlace lib/ansible/executor/task_executor.py \
--replace "[python," "["
'';
nativeBuildInputs = [
installShellFiles
];
propagatedBuildInputs = [
# depend on ansible-collections instead of the other way around
ansible-collections
# from requirements.txt
cryptography
jinja2
packaging
pyyaml
# optional dependencies
junit-xml
lxml
ncclient
paramiko
pexpect
psutil
pycrypto
requests
scp
xmltodict
] ++ lib.optional windowsSupport pywinrm;
postInstall = ''
installManPage docs/man/man1/*.1
'';
# internal import errors, missing dependencies
doCheck = false;
meta = with lib; {
description = "Radically simple IT automation";
homepage = "https://www.ansible.com";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ hexa ];
};
}