From 14167636fc6e3501cc27f2d25f9fcd4288f129ab Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Fri, 11 Dec 2015 11:24:56 +0100 Subject: [PATCH] python ansible: move to python-packages.nix --- pkgs/tools/system/ansible/default.nix | 33 --------------------------- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/python-packages.nix | 31 +++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 34 deletions(-) delete mode 100644 pkgs/tools/system/ansible/default.nix diff --git a/pkgs/tools/system/ansible/default.nix b/pkgs/tools/system/ansible/default.nix deleted file mode 100644 index ab5cea30873d..000000000000 --- a/pkgs/tools/system/ansible/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ windowsSupport ? true, stdenv, fetchurl, pythonPackages, python }: - -pythonPackages.buildPythonPackage rec { - version = "1.9.4"; - name = "ansible-${version}"; - namePrefix = ""; - - src = fetchurl { - url = "https://releases.ansible.com/ansible/${name}.tar.gz"; - sha256 = "1qvgzb66nlyc2ncmgmqhzdk0x0p2px09967p1yypf5czwjn2yb4p"; - }; - - prePatch = '' - sed -i "s,/usr/,$out," lib/ansible/constants.py - ''; - - doCheck = false; - dontStrip = true; - dontPatchELF = true; - dontPatchShebangs = true; - - pythonPath = with pythonPackages; [ - paramiko jinja2 pyyaml httplib2 boto six - ] ++ stdenv.lib.optional windowsSupport pywinrm; - - meta = with stdenv.lib; { - homepage = "http://www.ansible.com"; - description = "A simple automation tool"; - license = licenses.gpl3; - maintainers = [ maintainers.joamaki ]; - platforms = platforms.linux ++ [ "x86_64-darwin" ]; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2893a5c43702..9c9f89835a2b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5379,7 +5379,7 @@ let augeas = callPackage ../tools/system/augeas { }; - ansible = callPackage ../tools/system/ansible { }; + ansible = pythonPackages.ansible; ansible2 = callPackage ../tools/system/ansible/2.nix { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5fa5fca5735e..971e952ef475 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -556,6 +556,37 @@ in modules // { }; }; + ansible = buildPythonPackage rec { + version = "1.9.4"; + name = "ansible-${version}"; + + src = pkgs.fetchurl { + url = "https://releases.ansible.com/ansible/${name}.tar.gz"; + sha256 = "1qvgzb66nlyc2ncmgmqhzdk0x0p2px09967p1yypf5czwjn2yb4p"; + }; + + prePatch = '' + sed -i "s,/usr/,$out," lib/ansible/constants.py + ''; + + doCheck = false; + dontStrip = true; + dontPatchELF = true; + dontPatchShebangs = true; + windowsSupport = true; + + propagatedBuildInputs = with self; [ + paramiko jinja2 pyyaml httplib2 boto six + ] ++ optional windowsSupport pywinrm; + + meta = { + homepage = "http://www.ansible.com"; + description = "A simple automation tool"; + license = with licenses; [ gpl3] ; + maintainers = with maintainers; [ joamaki ]; + platforms = with platforms; [ linux darwin ]; + }; + }; apipkg = buildPythonPackage rec { name = "apipkg-1.4";