ansible: move out of pythonPackages

ansible is not a library
This commit is contained in:
Jörg Thalheim 2017-08-28 11:29:29 +01:00
parent 0f789e7a0c
commit 2f5dab753c
5 changed files with 37 additions and 65 deletions

View File

@ -1,19 +1,11 @@
{ lib
{ stdenv
, fetchurl
, buildPythonPackage
, pycrypto
, paramiko
, jinja2
, pyyaml
, httplib2
, boto
, six
, netaddr
, dns
, pythonPackages
, windowsSupport ? false
, pywinrm ? null
}:
with pythonPackages;
let
jinja = jinja2.override rec {
pname = "Jinja2";
@ -45,17 +37,18 @@ in buildPythonPackage rec {
dontPatchELF = true;
dontPatchShebangs = false;
propagatedBuildInputs = [ pycrypto paramiko jinja pyyaml httplib2
boto six netaddr dns ] ++ lib.optional windowsSupport pywinrm;
propagatedBuildInputs = [
pycrypto paramiko jinja pyyaml httplib2 boto six netaddr dns
] ++ stdenv.lib.optional windowsSupport pywinrm;
meta = {
meta = with stdenv.lib; {
homepage = http://www.ansible.com;
description = "A simple automation tool";
license = with lib.licenses; [ gpl3] ;
maintainers = with lib.maintainers; [
license = with licenses; [ gpl3] ;
maintainers = with maintainers; [
jgeerds
joamaki
];
platforms = with lib.platforms; linux ++ darwin;
platforms = with platforms; linux ++ darwin;
};
}

View File

@ -1,19 +1,11 @@
{ lib
{ stdenv
, fetchurl
, buildPythonPackage
, pycrypto
, paramiko
, jinja2
, pyyaml
, httplib2
, boto
, six
, netaddr
, dns
, pythonPackages
, windowsSupport ? false
, pywinrm ? null
}:
with pythonPackages;
let
# Shouldn't be needed anymore in next version
# https://github.com/NixOS/nixpkgs/pull/22345#commitcomment-20718521
@ -46,17 +38,18 @@ in buildPythonPackage rec {
dontPatchELF = true;
dontPatchShebangs = false;
propagatedBuildInputs = [ pycrypto paramiko jinja pyyaml httplib2
boto six netaddr dns ] ++ lib.optional windowsSupport pywinrm;
propagatedBuildInputs = [
pycrypto paramiko jinja pyyaml httplib2 boto six netaddr dns
] ++ stdenv.lib.optional windowsSupport pywinrm;
meta = {
meta = with stdenv.lib; {
homepage = http://www.ansible.com;
description = "A simple automation tool";
license = with lib.licenses; [ gpl3] ;
maintainers = with lib.maintainers; [
license = with licenses; [ gpl3] ;
maintainers = with maintainers; [
jgeerds
joamaki
];
platforms = with lib.platforms; linux ++ darwin;
platforms = with platforms; linux ++ darwin;
};
}

View File

@ -1,25 +1,14 @@
{ lib
{ stdenv
, fetchurl
, buildPythonPackage
, pycrypto
, paramiko
, jinja2
, pyyaml
, httplib2
, boto
, six
, netaddr
, dns
, pythonPackages
, windowsSupport ? false
, pywinrm ? null
}:
buildPythonPackage rec {
pythonPackages.buildPythonPackage rec {
pname = "ansible";
version = "2.3.1.0";
name = "${pname}-${version}";
src = fetchurl {
url = "http://releases.ansible.com/ansible/${name}.tar.gz";
sha256 = "1xdr82fy8gahxh3586wm5k1bxksys7yl1f2n24shrk8gf99qyjyd";
@ -34,17 +23,18 @@ buildPythonPackage rec {
dontPatchELF = true;
dontPatchShebangs = false;
propagatedBuildInputs = [ pycrypto paramiko jinja2 pyyaml httplib2
boto six netaddr dns ] ++ lib.optional windowsSupport pywinrm;
propagatedBuildInputs = with pythonPackages; [
pycrypto paramiko jinja2 pyyaml httplib2 boto six netaddr dns
] ++ stdenv.lib.optional windowsSupport pywinrm;
meta = {
meta = with stdenv.lib; {
homepage = http://www.ansible.com;
description = "A simple automation tool";
license = with lib.licenses; [ gpl3] ;
maintainers = with lib.maintainers; [
license = with licenses; [ gpl3] ;
maintainers = with maintainers; [
jgeerds
joamaki
];
platforms = with lib.platforms; linux ++ darwin;
platforms = with platforms; linux ++ darwin;
};
}

View File

@ -6618,8 +6618,11 @@ with pkgs;
augeas = callPackage ../tools/system/augeas { };
ansible = python2Packages.ansible2;
ansible2 = python2Packages.ansible2;
ansible_2_1 = callPackage ../tools/admin/ansible/2.1.nix {};
ansible_2_2 = callPackage ../tools/admin/ansible/2.2.nix {};
ansible_2_3 = callPackage ../tools/admin/ansible/2.3.nix {};
ansible = ansible_2_3;
ansible2 = ansible_2_3;
antlr = callPackage ../development/tools/parsing/antlr/2.7.7.nix { };

View File

@ -519,13 +519,6 @@ in {
amqplib = callPackage ../development/python-modules/amqplib {};
ansible = self.ansible2;
ansible2 = self.ansible_2_3;
ansible_2_1 = callPackage ../development/python-modules/ansible/2.1.nix {};
ansible_2_2 = callPackage ../development/python-modules/ansible/2.2.nix {};
ansible_2_3 = callPackage ../development/python-modules/ansible/2.3.nix {};
apipkg = callPackage ../development/python-modules/apipkg {};
appdirs = callPackage ../development/python-modules/appdirs { };