nixBuild: add failurehook that saves build dir when succeedOnFailure = true and keepBuildDirectory = true
svn path=/nixpkgs/trunk/; revision=25243
This commit is contained in:
parent
dbd6382955
commit
6016038097
@ -36,6 +36,18 @@ stdenv.mkDerivation (
|
|||||||
cp $origSrc/nix-support/hydra-release-name $out/nix-support/hydra-release-name
|
cp $origSrc/nix-support/hydra-release-name $out/nix-support/hydra-release-name
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
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
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
// args //
|
// args //
|
||||||
|
Loading…
x
Reference in New Issue
Block a user