* Split the installPhase into installPhase and fixupPhase. The
fixupPhase strips binaries, runs patchelf, etc. This is so that those things still happen when somebody overrides installPhase. svn path=/nixpkgs/trunk/; revision=7494
This commit is contained in:
parent
1d9dcbba22
commit
8ab9a58e0d
|
@ -655,6 +655,33 @@ installW() {
|
||||||
eval "$installCommand"
|
eval "$installCommand"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
eval "$postInstall"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
installPhase() {
|
||||||
|
if test "$dontInstall" = 1; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
header "installing"
|
||||||
|
startLog "install"
|
||||||
|
installW
|
||||||
|
stopLog
|
||||||
|
stopNest
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# The fixup phase performs generic, package-independent, Nix-related
|
||||||
|
# stuff, like running patchelf and setting the
|
||||||
|
# propagated-build-inputs. It should rarely be overriden.
|
||||||
|
fixupW() {
|
||||||
|
if test -n "$fixupPhase"; then
|
||||||
|
eval "$fixupPhase"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
eval "$preFixup"
|
||||||
|
|
||||||
if test -z "$dontStrip" -a "$NIX_STRIP_DEBUG" = 1; then
|
if test -z "$dontStrip" -a "$NIX_STRIP_DEBUG" = 1; then
|
||||||
find "$prefix" -name "*.a" -exec echo stripping {} \; \
|
find "$prefix" -name "*.a" -exec echo stripping {} \; \
|
||||||
-exec strip -S {} \; || fail
|
-exec strip -S {} \; || fail
|
||||||
|
@ -669,17 +696,17 @@ installW() {
|
||||||
echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs"
|
echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eval "$postInstall"
|
eval "$postFixup"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
installPhase() {
|
fixupPhase() {
|
||||||
if test "$dontInstall" = 1; then
|
if test "$dontFixup" = 1; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
header "installing"
|
header "post-installation fixup"
|
||||||
startLog "install"
|
startLog "fixup"
|
||||||
installW
|
fixupW
|
||||||
stopLog
|
stopLog
|
||||||
stopNest
|
stopNest
|
||||||
}
|
}
|
||||||
|
@ -741,7 +768,7 @@ genericBuild() {
|
||||||
|
|
||||||
if test -z "$phases"; then
|
if test -z "$phases"; then
|
||||||
phases="patchPhase configurePhase buildPhase checkPhase \
|
phases="patchPhase configurePhase buildPhase checkPhase \
|
||||||
installPhase distPhase";
|
installPhase fixupPhase distPhase";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in $phases; do
|
for i in $phases; do
|
||||||
|
|
Loading…
Reference in New Issue