2017-08-28 12:29:29 +02:00
|
|
|
{ stdenv
|
2017-01-27 09:58:43 +01:00
|
|
|
, fetchurl
|
2017-12-26 20:14:12 +01:00
|
|
|
, fetchFromGitHub
|
2017-08-28 12:29:29 +02:00
|
|
|
, pythonPackages
|
2017-02-11 13:26:52 +01:00
|
|
|
, windowsSupport ? false
|
2017-01-27 09:58:43 +01:00
|
|
|
}:
|
|
|
|
|
2017-08-28 12:29:29 +02:00
|
|
|
with pythonPackages;
|
|
|
|
|
2017-02-03 09:54:12 +01:00
|
|
|
let
|
|
|
|
# Shouldn't be needed anymore in next version
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/22345#commitcomment-20718521
|
2017-09-05 11:16:41 +02:00
|
|
|
jinja = jinja2.overridePythonAttrs (old: rec {
|
2017-02-03 09:54:12 +01:00
|
|
|
version = "2.8.1";
|
2017-09-05 11:16:41 +02:00
|
|
|
name = "${old.pname}-${version}";
|
2017-12-26 20:14:12 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pallets";
|
|
|
|
repo = "jinja";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0m6g6fx6flxb6hrkw757mbx1gxyrmj50w27m2afdsvmvz0zpdi2a";
|
2017-02-03 09:54:12 +01:00
|
|
|
};
|
|
|
|
});
|
|
|
|
in buildPythonPackage rec {
|
2017-01-27 09:58:43 +01:00
|
|
|
pname = "ansible";
|
|
|
|
version = "2.2.1.0";
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://releases.ansible.com/ansible/${name}.tar.gz";
|
|
|
|
sha256 = "0gz9i30pdmkchi936ijy873k8di6fmf3v5rv551hxyf0hjkjx8b3";
|
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
sed -i "s,/usr/,$out," lib/ansible/constants.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontPatchShebangs = false;
|
|
|
|
|
2017-08-28 12:29:29 +02:00
|
|
|
propagatedBuildInputs = [
|
2017-12-10 15:27:06 +01:00
|
|
|
pycrypto paramiko jinja pyyaml httplib2 boto six netaddr dnspython
|
2017-08-28 12:29:29 +02:00
|
|
|
] ++ stdenv.lib.optional windowsSupport pywinrm;
|
2017-01-27 09:58:43 +01:00
|
|
|
|
2017-08-28 12:29:29 +02:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://www.ansible.com;
|
2017-01-27 09:58:43 +01:00
|
|
|
description = "A simple automation tool";
|
2017-08-28 12:29:29 +02:00
|
|
|
license = with licenses; [ gpl3] ;
|
|
|
|
maintainers = with maintainers; [
|
2017-01-27 09:58:43 +01:00
|
|
|
jgeerds
|
|
|
|
joamaki
|
|
|
|
];
|
2017-08-28 12:29:29 +02:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2017-01-27 09:58:43 +01:00
|
|
|
};
|
2017-02-03 09:54:12 +01:00
|
|
|
}
|