diff --git a/pkgs/build-support/make-wrapper/make-wrapper.sh b/pkgs/build-support/make-wrapper/make-wrapper.sh index c13f623bcda..461f30780ee 100644 --- a/pkgs/build-support/make-wrapper/make-wrapper.sh +++ b/pkgs/build-support/make-wrapper/make-wrapper.sh @@ -66,7 +66,9 @@ makeWrapper() { fi done - echo "exec \"$original\" $flagsBefore \"\$@\"" >> $wrapper + # Note: extraFlagsArray is an array containing additional flags + # that may be set by --run actions. + echo exec "$original" $flagsBefore '"${extraFlagsArray[@]}"' '"$@"' >> $wrapper chmod +x $wrapper } @@ -90,7 +92,7 @@ filterExisting() { # Syntax: wrapProgram wrapProgram() { local prog="$1" - local hidden="$(dirname "$prog")/.wrapped-$(basename "$prog")" + local hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped mv $prog $hidden makeWrapper $hidden $prog "$@" } diff --git a/pkgs/development/tools/misc/automake/automake-1.10.x.nix b/pkgs/development/tools/misc/automake/automake-1.10.x.nix index 10aecf7c678..5296f0cbec3 100644 --- a/pkgs/development/tools/misc/automake/automake-1.10.x.nix +++ b/pkgs/development/tools/misc/automake/automake-1.10.x.nix @@ -1,9 +1,10 @@ -{stdenv, fetchurl, perl, autoconf}: +{stdenv, fetchurl, perl, autoconf, makeWrapper, doCheck ? false}: stdenv.mkDerivation rec { name = "automake-1.10.2"; builder = ./builder.sh; + setupHook = ./setup-hook.sh; src = fetchurl { @@ -11,12 +12,14 @@ stdenv.mkDerivation rec { sha256 = "03v4gsvi71nhqvnxxbhkrksdg5icrn8yda021852njfragzck2n3"; }; - patches = [ ./test-broken-make.patch ]; + buildInputs = [perl autoconf makeWrapper]; - buildInputs = [perl autoconf]; - - doCheck = true; + inherit doCheck; + # Disable indented log output from Make, otherwise "make.test" will + # fail. + preCheck = "unset NIX_INDENT_MAKE"; + # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the # "fixed" path in generated files! dontPatchShebangs = true; diff --git a/pkgs/development/tools/misc/automake/automake-1.7.x.nix b/pkgs/development/tools/misc/automake/automake-1.7.x.nix index fc34ef8e3aa..e0d8e516d3b 100644 --- a/pkgs/development/tools/misc/automake/automake-1.7.x.nix +++ b/pkgs/development/tools/misc/automake/automake-1.7.x.nix @@ -1,14 +1,16 @@ -{stdenv, fetchurl, perl, autoconf}: +{stdenv, fetchurl, perl, autoconf, makeWrapper}: stdenv.mkDerivation { name = "automake-1.7.9"; + builder = ./builder.sh; - setupHook = ./setup-hook.sh; + src = fetchurl { url = http://nixos.org/tarballs/automake-1.7.9.tar.bz2; md5 = "571fd0b0598eb2a27dcf68adcfddfacb"; }; - buildInputs = [perl autoconf]; + + buildInputs = [perl autoconf makeWrapper]; # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the # "fixed" path in generated files! diff --git a/pkgs/development/tools/misc/automake/automake-1.9.x.nix b/pkgs/development/tools/misc/automake/automake-1.9.x.nix index ccc2c6baac6..5ca279d23ad 100644 --- a/pkgs/development/tools/misc/automake/automake-1.9.x.nix +++ b/pkgs/development/tools/misc/automake/automake-1.9.x.nix @@ -1,16 +1,33 @@ -{stdenv, fetchurl, perl, autoconf}: +{stdenv, fetchurl, perl, autoconf, makeWrapper}: stdenv.mkDerivation { name = "automake-1.9.6"; + builder = ./builder.sh; + setupHook = ./setup-hook.sh; + src = fetchurl { url = ftp://ftp.gnu.org/gnu/automake/automake-1.9.6.tar.gz; md5 = "c60f77a42f103606981d456f1615f5b4"; }; - buildInputs = [perl autoconf]; + + buildInputs = [perl autoconf makeWrapper]; # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the # "fixed" path in generated files! dontPatchShebangs = true; + + meta = { + homepage = http://www.gnu.org/software/automake/; + description = "GNU Automake, a GNU standard-compliant makefile generator"; + + longDescription = '' + GNU Automake is a tool for automatically generating + `Makefile.in' files compliant with the GNU Coding + Standards. Automake requires the use of Autoconf. + ''; + + license = "GPLv2+"; + }; } diff --git a/pkgs/development/tools/misc/automake/builder.sh b/pkgs/development/tools/misc/automake/builder.sh index 0f5e955f880..6b0cd7e4fa2 100644 --- a/pkgs/development/tools/misc/automake/builder.sh +++ b/pkgs/development/tools/misc/automake/builder.sh @@ -2,46 +2,25 @@ source $stdenv/setup postInstall() { - # Create a wrapper around `aclocal' that converts every element in # `ACLOCAL_PATH' into a `-I dir' option. This way `aclocal' # becomes modular; M4 macros do not need to be stored in a single # global directory, while callers of `aclocal' do not need to pass # `-I' options explicitly. - mv $out/bin/aclocal $out/bin/_tmp - - for i in $out/bin/aclocal*; do - rm $i - ln -s aclocal $i - done - - cat > $out/bin/aclocal <