Slightly generalize `sourceTarball'.

svn path=/nixpkgs/trunk/; revision=18426
This commit is contained in:
Ludovic Courtès 2009-11-18 14:12:39 +00:00
parent bab04acc3a
commit 15da008651

View File

@ -73,33 +73,35 @@ stdenv.mkDerivation (
# Nix buildfarm. (Stratego/XT's autoxt uses it. We should # Nix buildfarm. (Stratego/XT's autoxt uses it. We should
# update it eventually.) # update it eventually.)
echo ${versionSuffix} | sed -e s/pre// > svn-revision echo ${versionSuffix} | sed -e s/pre// > svn-revision
eval "$preAutoconf" eval "$preAutoconf"
if test -f ./bootstrap; then ./bootstrap if test -x ./bootstrap; then ./bootstrap
elif test -f ./bootstrap.sh; then ./bootstrap.sh elif test -x ./bootstrap.sh; then ./bootstrap.sh
elif test -f ./reconf; then ./reconf elif test -x ./autogen.sh; then ./autogen.sh
elif test -x ./autogen ; then ./autogen
elif test -x ./reconf; then ./reconf
elif test -f ./configure.in || test -f ./configure.ac; then elif test -f ./configure.in || test -f ./configure.ac; then
autoreconf --install --force --verbose autoreconf --install --force --verbose
else else
echo "No bootstrap, bootstrap.sh, configure.in or configure.ac. Assuming this is not an GNU Autotools package." echo "No bootstrap, bootstrap.sh, configure.in or configure.ac. Assuming this is not an GNU Autotools package."
fi fi
eval "$postAutoconf" eval "$postAutoconf"
''; '';
# Cause distPhase to copy tar.bz2 in addition to tar.gz. # Cause distPhase to copy tar.bz2 in addition to tar.gz.
tarballs = "*.tar.gz *.tar.bz2"; tarballs = "*.tar.gz *.tar.bz2 *.tar.xz";
finalPhase = '' finalPhase = ''
for i in $out/tarballs/*; do for i in "$out/tarballs/"*; do
echo "file source-dist $i" >> $out/nix-support/hydra-build-products echo "file source-dist $i" >> $out/nix-support/hydra-build-products
done done
# Try to figure out the release name. # Try to figure out the release name.
releaseName=$( (cd $out/tarballs && ls) | head -n 1 | sed -e 's^\.[a-z].*^^') releaseName=$( (cd $out/tarballs && ls) | head -n 1 | sed -e 's^\.[a-z].*^^')
test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name) test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name)
''; # */ '';
passthru = { passthru = {
inherit src; inherit src;