nixpkgs/pkgs/development/python-modules/ansible/default.nix
Martin Weinelt dde157780c
ansible: v2.9.2 → v2.9.7
Fixes: CVE-2020-10684, CVE-2020-1733, CVE-2020-1735, CVE-2020-1739, CVE-2020-1740
2020-05-05 21:23:12 +02:00

58 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.7";
src = fetchFromGitHub {
owner = "ansible";
repo = "ansible";
rev = "v${version}";
sha256 = "0miid7h720i630qljcjdmgdblflhrl2pwqjgiq5wm8jr61c3ld6s";
};
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 ];
platforms = platforms.linux ++ platforms.darwin;
};
}