1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, pycrypto
5, paramiko
6, jinja2
7, pyyaml
8, httplib2
9, six
10, netaddr
11, dnspython
12, jmespath
13, dopy
14, ncclient
15, windowsSupport ? false
16, pywinrm
17}:
18
19buildPythonPackage rec {
20 pname = "ansible";
21 version = "2.9.12";
22
23 src = fetchFromGitHub {
24 owner = "ansible";
25 repo = "ansible";
26 rev = "v${version}";
27 sha256 = "0c794k0cyl54807sh9in0l942ah6g6wlz5kf3qvy5lhd581zlgyb";
28 };
29
30 prePatch = ''
31 # ansible-connection is wrapped, so make sure it's not passed
32 # through the python interpreter.
33 sed -i "s/\[python, /[/" lib/ansible/executor/task_executor.py
34 '';
35
36 postInstall = ''
37 for m in docs/man/man1/*; do
38 install -vD $m -t $out/share/man/man1
39 done
40 '';
41
42 propagatedBuildInputs = [
43 pycrypto paramiko jinja2 pyyaml httplib2
44 six netaddr dnspython jmespath dopy ncclient
45 ] ++ lib.optional windowsSupport pywinrm;
46
47 # dificult to test
48 doCheck = false;
49
50 meta = with lib; {
51 homepage = "http://www.ansible.com";
52 description = "Radically simple IT automation";
53 license = [ licenses.gpl3 ] ;
54 maintainers = with maintainers; [ joamaki costrouc hexa ];
55 platforms = platforms.linux ++ platforms.darwin;
56 };
57}