pythonPackages.ansible2: move 2.2 to separate file, make default

`pythonPackages.ansible_2_2` is now the default `ansible`.
This commit is contained in:
Frederik Rietdijk 2017-01-27 09:58:43 +01:00
parent 377b05ae38
commit 46b1ea260a
4 changed files with 62 additions and 38 deletions

View File

@ -46,7 +46,14 @@ following incompatible changes:</para>
for what those parameters represent.
</para>
</listitem>
<listitem>
<para>
<literal>ansible</literal> now defaults to ansible version 2 as version 1
has been removed due to a serious <link
xlink:href="https://www.computest.nl/advisories/CT-2017-0109_Ansible.txt">
vulnerability</link> unpatched by upstream.
</para>
</listitem>
<listitem>
<para>
<literal>gnome</literal> alias has been removed along with

View File

@ -0,0 +1,50 @@
{ lib
, fetchurl
, buildPythonPackage
, pycrypto
, paramiko
, jinja2
, pyyaml
, httplib2
, boto
, six
, netaddr
, dns
, pywinrm
}:
buildPythonPackage rec {
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;
windowsSupport = true;
propagatedBuildInputs = [ pycrypto paramiko jinja2 pyyaml httplib2
boto six netaddr dns ] ++ lib.optional windowsSupport pywinrm;
meta = {
homepage = "http://www.ansible.com";
description = "A simple automation tool";
license = with lib.licenses; [ gpl3] ;
maintainers = with lib.maintainers; [
jgeerds
joamaki
];
platforms = with lib.platforms; linux ++ darwin;
};
}

View File

@ -6007,8 +6007,7 @@ with pkgs;
augeas = callPackage ../tools/system/augeas { };
ansible = python2Packages.ansible;
ansible = python2Packages.ansible2;
ansible2 = python2Packages.ansible2;
antlr = callPackage ../development/tools/parsing/antlr/2.7.7.nix { };

View File

@ -923,42 +923,10 @@ in {
};
};
ansible2 = buildPythonPackage rec {
version = "2.2.0.0";
name = "ansible-${version}";
disabled = isPy3k;
ansible = self.ansible2;
ansible2 = self.ansible_2_2;
src = pkgs.fetchurl {
url = "http://releases.ansible.com/ansible/${name}.tar.gz";
sha256 = "11l5814inr44ammp0sh304rqx2382fr629c0pbwf0k1rjg99iwfr";
};
prePatch = ''
sed -i "s,/usr/,$out," lib/ansible/constants.py
'';
doCheck = false;
dontStrip = true;
dontPatchELF = true;
dontPatchShebangs = true;
windowsSupport = true;
propagatedBuildInputs = with self; [
pycrypto paramiko jinja2 pyyaml httplib2 boto six
netaddr dns
] ++ optional windowsSupport pywinrm;
meta = with stdenv.lib; {
homepage = "http://www.ansible.com";
description = "A simple automation tool";
license = with licenses; [ gpl3 ];
maintainers = with maintainers; [
copumpkin
jgeerds
];
platforms = with platforms; linux ++ darwin;
};
};
ansible_2_2 = callPackage ../development/python-modules/ansible/2.2.nix {};
apipkg = buildPythonPackage rec {
name = "apipkg-1.4";