git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.ansible2: move 2.2 to separate file, make default

`pythonPackages.ansible_2_2` is now the default `ansible`.

commit46b1ea260a05d2d5fb01624c93d405daaf750b0c authorFrederik Rietdijk <fridh@fridh.nl> dateFri 27 Jan 2017, 09:58 (10 years ago) parent377b05a
4 files changed+62−38
nixos/doc/manual/release-notes/rl-1703.xml+8−1 pkgs/development/python-modules/ansible/2.2.nix+50 pkgs/top-level/all-packages.nix+1−2 pkgs/top-level/python-packages.nix+3−35
nixos/doc/manual/release-notes/rl-1703.xml+8−1
@@ -46,7 +46,14 @@ following incompatible changes:</para>
4646 for what those parameters represent.
4747 </para>
4848 </listitem>
49−
49+ <listitem>
50+ <para>
51+ <literal>ansible</literal> now defaults to ansible version 2 as version 1
52+ has been removed due to a serious <link
53+ xlink:href="https://www.computest.nl/advisories/CT-2017-0109_Ansible.txt">
54+ vulnerability</link> unpatched by upstream.
55+ </para>
56+ </listitem>
5057 <listitem>
5158 <para>
5259 <literal>gnome</literal> alias has been removed along with
pkgs/development/python-modules/ansible/2.2.nixnew file+50
@@ -0,0 +1,50 @@
1+{ lib
2+, fetchurl
3+, buildPythonPackage
4+, pycrypto
5+, paramiko
6+, jinja2
7+, pyyaml
8+, httplib2
9+, boto
10+, six
11+, netaddr
12+, dns
13+, pywinrm
14+}:
15+
16+buildPythonPackage rec {
17+ pname = "ansible";
18+ version = "2.2.1.0";
19+ name = "${pname}-${version}";
20+
21+
22+ src = fetchurl {
23+ url = "http://releases.ansible.com/ansible/${name}.tar.gz";
24+ sha256 = "0gz9i30pdmkchi936ijy873k8di6fmf3v5rv551hxyf0hjkjx8b3";
25+ };
26+
27+ prePatch = ''
28+ sed -i "s,/usr/,$out," lib/ansible/constants.py
29+ '';
30+
31+ doCheck = false;
32+ dontStrip = true;
33+ dontPatchELF = true;
34+ dontPatchShebangs = false;
35+ windowsSupport = true;
36+
37+ propagatedBuildInputs = [ pycrypto paramiko jinja2 pyyaml httplib2
38+ boto six netaddr dns ] ++ lib.optional windowsSupport pywinrm;
39+
40+ meta = {
41+ homepage = "http://www.ansible.com";
42+ description = "A simple automation tool";
43+ license = with lib.licenses; [ gpl3] ;
44+ maintainers = with lib.maintainers; [
45+ jgeerds
46+ joamaki
47+ ];
48+ platforms = with lib.platforms; linux ++ darwin;
49+ };
50+}
pkgs/top-level/all-packages.nix+1−2
@@ -6007,8 +6007,7 @@ with pkgs;
60076007
60086008 augeas = callPackage ../tools/system/augeas { };
60096009
6010− ansible = python2Packages.ansible;
6011−
6010+ ansible = python2Packages.ansible2;
60126011 ansible2 = python2Packages.ansible2;
60136012
60146013 antlr = callPackage ../development/tools/parsing/antlr/2.7.7.nix { };
pkgs/top-level/python-packages.nix+3−35
@@ -923,42 +923,10 @@ in {
923923 };
924924 };
925925
926− ansible2 = buildPythonPackage rec {
927− version = "2.2.0.0";
928− name = "ansible-${version}";
929− disabled = isPy3k;
930−
931− src = pkgs.fetchurl {
932− url = "http://releases.ansible.com/ansible/${name}.tar.gz";
933− sha256 = "11l5814inr44ammp0sh304rqx2382fr629c0pbwf0k1rjg99iwfr";
934− };
935−
936− prePatch = ''
937− sed -i "s,/usr/,$out," lib/ansible/constants.py
938− '';
926+ ansible = self.ansible2;
927+ ansible2 = self.ansible_2_2;
939928
940− doCheck = false;
941− dontStrip = true;
942− dontPatchELF = true;
943− dontPatchShebangs = true;
944− windowsSupport = true;
945−
946− propagatedBuildInputs = with self; [
947− pycrypto paramiko jinja2 pyyaml httplib2 boto six
948− netaddr dns
949− ] ++ optional windowsSupport pywinrm;
950−
951− meta = with stdenv.lib; {
952− homepage = "http://www.ansible.com";
953− description = "A simple automation tool";
954− license = with licenses; [ gpl3 ];
955− maintainers = with maintainers; [
956− copumpkin
957− jgeerds
958− ];
959− platforms = with platforms; linux ++ darwin;
960− };
961− };
929+ ansible_2_2 = callPackage ../development/python-modules/ansible/2.2.nix {};
962930
963931 apipkg = buildPythonPackage rec {
964932 name = "apipkg-1.4";