2ce89355c3
GitOrigin-RevId: 22a81aa5fc15b2d41b12f7160a71cd4a9f3c3fa1
57 lines
1.2 KiB
Nix
57 lines
1.2 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildPythonPackage
|
|
, pycrypto
|
|
, paramiko
|
|
, jinja2
|
|
, pyyaml
|
|
, httplib2
|
|
, six
|
|
, netaddr
|
|
, dnspython
|
|
, jmespath
|
|
, dopy
|
|
, ncclient
|
|
, windowsSupport ? false
|
|
, pywinrm
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "ansible";
|
|
version = "2.9.10";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ansible";
|
|
repo = "ansible";
|
|
rev = "v${version}";
|
|
sha256 = "1979522k57gafvq9vx3lbc3zah7jq3kiy98ji9x5bmxyddmgr9ch";
|
|
};
|
|
|
|
prePatch = ''
|
|
# ansible-connection is wrapped, so make sure it's not passed
|
|
# through the python interpreter.
|
|
sed -i "s/\[python, /[/" lib/ansible/executor/task_executor.py
|
|
'';
|
|
|
|
postInstall = ''
|
|
for m in docs/man/man1/*; do
|
|
install -vD $m -t $out/share/man/man1
|
|
done
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
pycrypto paramiko jinja2 pyyaml httplib2
|
|
six netaddr dnspython jmespath dopy ncclient
|
|
] ++ lib.optional windowsSupport pywinrm;
|
|
|
|
# dificult to test
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
homepage = "http://www.ansible.com";
|
|
description = "Radically simple IT automation";
|
|
license = [ licenses.gpl3 ] ;
|
|
maintainers = with maintainers; [ joamaki costrouc hexa ];
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
};
|
|
}
|