also add succeedOnFailure/keepBuildDirectory behaviour to source-tarball.nix

svn path=/nixpkgs/trunk/; revision=25400
This commit is contained in:
Rob Vermaas 2011-01-05 07:31:29 +00:00
parent 6591a859b2
commit f6426bad3b

View File

@ -68,6 +68,18 @@ stdenv.mkDerivation (
eval "$postAutoconf"
'';
failureHook = ''
if test -n "$succeedOnFailure"; then
if test -n "$keepBuildDirectory"; then
KEEPBUILDDIR="$out/`basename $TMPDIR`"
header "Copying build directory to $KEEPBUILDDIR"
ensureDir $KEEPBUILDDIR
cp -vR $TMPDIR/* $KEEPBUILDDIR
stopNest
fi
fi
'';
}
# Then, the caller-supplied attributes.