diff --git a/automake/automake.nix b/automake/automake.nix new file mode 100644 index 0000000..1efab95 --- /dev/null +++ b/automake/automake.nix @@ -0,0 +1,20 @@ +{stdenv, fetchurl, perl, autoconf269}: stdenv.mkDerivation rec { + pname = "automake"; + version = "1.11.6"; + + src = fetchurl { + url = "mirror://gnu/automake/automake-${version}.tar.gz"; + hash = "sha256-U9vxlFQBxD9M4ZwZcbrs2/i8MuDzf6P0n+e2mS0NIDA="; + }; + + patches = [ ./fix-perl-5.26.patch ]; + + builder = ./builder.sh; + setupHook = ./setup-hook.sh; + + # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + buildInputs = [ perl autoconf269 ]; +} diff --git a/automake/builder.sh b/automake/builder.sh new file mode 100644 index 0000000..a490b0d --- /dev/null +++ b/automake/builder.sh @@ -0,0 +1,48 @@ +source $stdenv/setup + +# Wrap the given `aclocal' program, appending extra `-I' flags +# corresponding to the directories listed in $ACLOCAL_PATH. (Note +# that `wrapProgram' can't be used for that purpose since it can only +# prepend flags, not append them.) +wrapAclocal() { + local program="$1" + local wrapped="$(dirname $program)/.$(basename $program)-wrapped" + + mv "$program" "$wrapped" + cat > "$program"<