@@ -0,0 +1,40 @@
1+{ stdenv
2+, fetchurl
3+, pythonPackages
4+, windowsSupport ? false
5+}:
6+
7+pythonPackages.buildPythonPackage rec {
8+ pname = "ansible";
9+ version = "2.4.0.0";
10+ name = "${pname}-${version}";
11+
12+ src = fetchurl {
13+ url = "http://releases.ansible.com/ansible/${name}.tar.gz";
14+ sha256 = "0xkwnx817rygb1922gncv9ivgvb7hjg8g53r39hfdm3jgzp6y9qs";
15+ };
16+
17+ prePatch = ''
18+ sed -i "s,/usr/,$out," lib/ansible/constants.py
19+ '';
20+
21+ doCheck = false;
22+ dontStrip = true;
23+ dontPatchELF = true;
24+ dontPatchShebangs = false;
25+
26+ propagatedBuildInputs = with pythonPackages; [
27+ pycrypto paramiko jinja2 pyyaml httplib2 boto six netaddr dns
28+ ] ++ stdenv.lib.optional windowsSupport pywinrm;
29+
30+ meta = with stdenv.lib; {
31+ homepage = http://www.ansible.com;
32+ description = "A simple automation tool";
33+ license = with licenses; [ gpl3 ];
34+ maintainers = with maintainers; [
35+ jgeerds
36+ joamaki
37+ ];
38+ platforms = with platforms; linux ++ darwin;
39+ };
40+}