2017-08-28 11:29:29 +01:00
|
|
|
{ stdenv
|
2017-01-27 08:58:43 +00:00
|
|
|
, fetchurl
|
2017-12-26 19:14:12 +00:00
|
|
|
, fetchFromGitHub
|
2017-08-28 11:29:29 +01:00
|
|
|
, pythonPackages
|
2017-02-11 12:26:52 +00:00
|
|
|
, windowsSupport ? false
|
2017-01-27 08:58:43 +00:00
|
|
|
}:
|
|
|
|
|
2017-08-28 11:29:29 +01:00
|
|
|
with pythonPackages;
|
|
|
|
|
2017-02-03 08:54:12 +00:00
|
|
|
let
|
|
|
|
# Shouldn't be needed anymore in next version
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/22345#commitcomment-20718521
|
2017-09-05 10:16:41 +01:00
|
|
|
jinja = jinja2.overridePythonAttrs (old: rec {
|
2017-02-03 08:54:12 +00:00
|
|
|
version = "2.8.1";
|
2017-09-05 10:16:41 +01:00
|
|
|
name = "${old.pname}-${version}";
|
2017-12-26 19:14:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pallets";
|
|
|
|
repo = "jinja";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0m6g6fx6flxb6hrkw757mbx1gxyrmj50w27m2afdsvmvz0zpdi2a";
|
2017-02-03 08:54:12 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
in buildPythonPackage rec {
|
2017-01-27 08:58:43 +00: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 11:29:29 +01:00
|
|
|
propagatedBuildInputs = [
|
2017-12-10 14:27:06 +00:00
|
|
|
pycrypto paramiko jinja pyyaml httplib2 boto six netaddr dnspython
|
2017-08-28 11:29:29 +01:00
|
|
|
] ++ stdenv.lib.optional windowsSupport pywinrm;
|
2017-01-27 08:58:43 +00:00
|
|
|
|
2017-08-28 11:29:29 +01:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://www.ansible.com;
|
2017-01-27 08:58:43 +00:00
|
|
|
description = "A simple automation tool";
|
2017-08-28 11:29:29 +01:00
|
|
|
license = with licenses; [ gpl3] ;
|
|
|
|
maintainers = with maintainers; [
|
2017-01-27 08:58:43 +00:00
|
|
|
jgeerds
|
|
|
|
joamaki
|
|
|
|
];
|
2017-08-28 11:29:29 +01:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2017-01-27 08:58:43 +00:00
|
|
|
};
|
2017-02-03 08:54:12 +00:00
|
|
|
}
|