diff options
Diffstat (limited to 'pkgs/development/tools/misc')
-rw-r--r-- | pkgs/development/tools/misc/autoconf/autoconf-libtool.nix | 22 | ||||
-rw-r--r-- | pkgs/development/tools/misc/autoconf/builder.sh | 8 | ||||
-rw-r--r-- | pkgs/development/tools/misc/autoconf/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/tools/misc/autoconf/libtoolbuilder.sh | 28 | ||||
-rw-r--r-- | pkgs/development/tools/misc/automake/builder.sh | 55 | ||||
-rw-r--r-- | pkgs/development/tools/misc/automake/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/tools/misc/automake/setup-hook.sh | 7 | ||||
-rw-r--r-- | pkgs/development/tools/misc/libtool/builder.sh | 8 | ||||
-rw-r--r-- | pkgs/development/tools/misc/libtool/default.nix | 11 |
9 files changed, 64 insertions, 85 deletions
diff --git a/pkgs/development/tools/misc/autoconf/autoconf-libtool.nix b/pkgs/development/tools/misc/autoconf/autoconf-libtool.nix deleted file mode 100644 index b77fe727eec..00000000000 --- a/pkgs/development/tools/misc/autoconf/autoconf-libtool.nix +++ /dev/null @@ -1,22 +0,0 @@ -{stdenv, fetchurl, m4, perl}: -derivation { - name = "autoconf-2.58-automake-1.7.9-libtool-1.5"; - system = stdenv.system; - builder = ./libtoolbuilder.sh; - autoconfsrc = fetchurl { - url = ftp://ftp.nluug.nl/pub/gnu/autoconf/autoconf-2.58.tar.bz2; - md5 = "db3fa3069c6554b3505799c7e1022e2b"; - }; - automakesrc = fetchurl { - url = ftp://ftp.nluug.nl/pub/gnu/automake/automake-1.7.9.tar.bz2; - md5 = "571fd0b0598eb2a27dcf68adcfddfacb"; - }; - libtoolsrc = fetchurl { - url = http://ftp.gnu.org/gnu/libtool/libtool-1.5.tar.gz; - md5 = "0e1844f25e2ad74c3715b5776d017545"; - }; - stdenv = stdenv; - m4 = m4; - perl = perl; -} - diff --git a/pkgs/development/tools/misc/autoconf/builder.sh b/pkgs/development/tools/misc/autoconf/builder.sh deleted file mode 100644 index de4db475aaa..00000000000 --- a/pkgs/development/tools/misc/autoconf/builder.sh +++ /dev/null @@ -1,8 +0,0 @@ -buildinputs="$m4 $perl" -. $stdenv/setup || exit 1 - -tar xvfj $src || exit 1 -cd autoconf-* || exit 1 -./configure --prefix=$out || exit 1 -make || exit 1 -make install || exit 1 diff --git a/pkgs/development/tools/misc/autoconf/default.nix b/pkgs/development/tools/misc/autoconf/default.nix index c850d1fb8fe..7af57fb703a 100644 --- a/pkgs/development/tools/misc/autoconf/default.nix +++ b/pkgs/development/tools/misc/autoconf/default.nix @@ -1,11 +1,10 @@ {stdenv, fetchurl, m4, perl}: + stdenv.mkDerivation { name = "autoconf-2.58"; - builder = ./builder.sh; src = fetchurl { url = ftp://ftp.nluug.nl/pub/gnu/autoconf/autoconf-2.58.tar.bz2; md5 = "db3fa3069c6554b3505799c7e1022e2b"; }; - m4 = m4; - perl = perl; + buildInputs = [m4 perl]; } diff --git a/pkgs/development/tools/misc/autoconf/libtoolbuilder.sh b/pkgs/development/tools/misc/autoconf/libtoolbuilder.sh deleted file mode 100644 index 34bdbcb35b7..00000000000 --- a/pkgs/development/tools/misc/autoconf/libtoolbuilder.sh +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/sh - -buildinputs="$m4 $perl $out" -. $stdenv/setup || exit 1 - -tar xvfj $autoconfsrc || exit 1 -cd autoconf-* || exit 1 -./configure --prefix=$out || exit 1 -make || exit 1 -make install || exit 1 - -buildinputs="$m4 $perl $out" -. $stdenv/setup || exit 1 - -tar xvfj $automakesrc || exit 1 -cd automake-* || exit 1 -./configure --prefix=$out || exit 1 -make || exit 1 -make install || exit 1 - -buildinputs="$m4 $perl $out" -. $stdenv/setup || exit 1 - -tar xvfz $libtoolsrc || exit 1 -cd libtool-* || exit 1 -./configure --prefix=$out || exit 1 -make || exit 1 -make install || exit 1 \ No newline at end of file diff --git a/pkgs/development/tools/misc/automake/builder.sh b/pkgs/development/tools/misc/automake/builder.sh index 6610efa7205..5b319dd3158 100644 --- a/pkgs/development/tools/misc/automake/builder.sh +++ b/pkgs/development/tools/misc/automake/builder.sh @@ -1,8 +1,47 @@ -buildinputs="$perl $autoconf" -. $stdenv/setup || exit 1 - -tar xvfj $src || exit 1 -cd automake-* || exit 1 -./configure --prefix=$out || exit 1 -make || exit 1 -make install || exit 1 +. $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 <<EOF +#! $SHELL -e + +oldIFS=\$IFS +IFS=: +extra= +for i in \$ACLOCAL_PATH; do + if test -n "\$i"; then + extra="\$extra -I \$i" + fi +done +IFS=\$oldIFS + +exec $out/bin/aclocal-orig \${extra[@]} "\$@" +EOF + chmod +x $out/bin/aclocal + mv $out/bin/_tmp $out/bin/aclocal-orig + + + # Automatically let `ACLOCAL_PATH' include all build inputs that + # have a `.../share/aclocal' directory. + test -x $out/nix-support || mkdir $out/nix-support + cp -p $setupHook $out/nix-support/setup-hook + +} +postInstall=postInstall + + +genericBuild diff --git a/pkgs/development/tools/misc/automake/default.nix b/pkgs/development/tools/misc/automake/default.nix index 3daa1708d4f..e8c23bfa80e 100644 --- a/pkgs/development/tools/misc/automake/default.nix +++ b/pkgs/development/tools/misc/automake/default.nix @@ -1,11 +1,12 @@ {stdenv, fetchurl, perl, autoconf}: + stdenv.mkDerivation { name = "automake-1.7.9"; builder = ./builder.sh; + setupHook = ./setup-hook.sh; src = fetchurl { url = ftp://ftp.nluug.nl/pub/gnu/automake/automake-1.7.9.tar.bz2; md5 = "571fd0b0598eb2a27dcf68adcfddfacb"; }; - perl = perl; - autoconf = autoconf; + buildInputs = [perl autoconf]; } diff --git a/pkgs/development/tools/misc/automake/setup-hook.sh b/pkgs/development/tools/misc/automake/setup-hook.sh new file mode 100644 index 00000000000..097b7b6cbe5 --- /dev/null +++ b/pkgs/development/tools/misc/automake/setup-hook.sh @@ -0,0 +1,7 @@ +addAclocals () { + if test -d $1/share/aclocal; then + export ACLOCAL_PATH="$ACLOCAL_PATH${ACLOCAL_PATH:+:}$1/share/aclocal" + fi +} + +envHooks=(${envHooks[@]} addAclocals) diff --git a/pkgs/development/tools/misc/libtool/builder.sh b/pkgs/development/tools/misc/libtool/builder.sh deleted file mode 100644 index 4b8407fb533..00000000000 --- a/pkgs/development/tools/misc/libtool/builder.sh +++ /dev/null @@ -1,8 +0,0 @@ -buildinputs="$m4 $perl" -. $stdenv/setup || exit 1 - -tar xvfz $src || exit 1 -cd libtool-* || exit 1 -./configure --prefix=$out || exit 1 -make || exit 1 -make install || exit 1 diff --git a/pkgs/development/tools/misc/libtool/default.nix b/pkgs/development/tools/misc/libtool/default.nix index e02658af93a..9bf3574fec6 100644 --- a/pkgs/development/tools/misc/libtool/default.nix +++ b/pkgs/development/tools/misc/libtool/default.nix @@ -1,11 +1,10 @@ {stdenv, fetchurl, m4, perl}: + stdenv.mkDerivation { - name = "libtool-1.5"; - builder = ./builder.sh; + name = "libtool-1.5.2"; src = fetchurl { - url = http://ftp.gnu.org/gnu/libtool/libtool-1.5.tar.gz; - md5 = "0e1844f25e2ad74c3715b5776d017545"; + url = http://ftp.gnu.org/gnu/libtool/libtool-1.5.2.tar.gz; + md5 = "db66ba05502f533ad0cfd84dc0e03bd5"; }; - m4 = m4; - perl = perl; + buildInputs = [m4 perl]; } |