diff --git a/lib/maintainers.nix b/lib/maintainers.nix index a0aae2f3b592..3a66f7a60b38 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -46,6 +46,7 @@ iElectric = "Domen Kozar "; iyzsong = "Song Wenwu "; jcumming = "Jack Cummings "; + joamaki = "Jussi Maki "; joelteon = "Joel Taylor "; jwiegley = "John Wiegley "; kkallio = "Karn Kallio "; diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index 9dedd3ceae73..59b18d772cf4 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -135,8 +135,7 @@ python.stdenv.mkDerivation (attrs // { runHook postInstall ''; - postFixup = - '' + postFixup = attrs.postFixup or '' wrapPythonPrograms # If a user installs a Python package, they probably also wants its diff --git a/pkgs/tools/system/ansible/default.nix b/pkgs/tools/system/ansible/default.nix new file mode 100644 index 000000000000..7d96092a3ceb --- /dev/null +++ b/pkgs/tools/system/ansible/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, pythonPackages, python }: + +pythonPackages.buildPythonPackage rec { + version = "1.6.1"; + name = "ansible-${version}"; + namePrefix = ""; + + src = fetchurl { + url = "https://github.com/ansible/ansible/archive/v${version}.tar.gz"; + sha256 = "1iz1q2h0zll4qsxk0pndc59knasw663kv53sm21q57qz7lf30q9z"; + }; + + prePatch = '' + sed -i "s,\/usr\/share\/ansible\/,$out/share/ansible," lib/ansible/constants.py + ''; + + doCheck = false; + dontStrip = true; + dontPatchELF = true; + dontPatchShebangs = true; + + propagatedBuildInputs = with pythonPackages; [ + paramiko jinja2 pyyaml httplib2 boto + ]; + + postFixup = '' + wrapPythonProgramsIn $out/bin "$out $pythonPath" + ''; + + meta = with stdenv.lib; { + homepage = "http://www.ansible.com"; + description = "A simple automation tool"; + license = licenses.gpl3; + maintainers = [ maintainers.joamaki ]; + platforms = platforms.linux; # Only tested on Linux + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c0cc88c208e0..7e2883d45c4c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3672,6 +3672,8 @@ let ### DEVELOPMENT / TOOLS + ansible = callPackage ../tools/system/ansible { }; + antlr = callPackage ../development/tools/parsing/antlr/2.7.7.nix { }; antlr3 = callPackage ../development/tools/parsing/antlr { };