stdenv: add first iteration of the multiout hook

Now it should contain *all* information from stdenv/setup.sh of
the original mutiple-output branch.
However, the configurability of the output paths is much greater.
This commit is contained in:
Vladimír Čunát
2014-08-24 19:07:47 +02:00
parent 4e72b61de9
commit def75f0282
3 changed files with 69 additions and 9 deletions
+12 -9
View File
@@ -259,16 +259,19 @@ for i in $crossPkgs; do
done
# Add the output as an rpath. ToDo: multiple-output?
if [ "$NIX_NO_SELF_RPATH" != 1 ]; then
export NIX_LDFLAGS="-rpath $out/lib $NIX_LDFLAGS"
if [ -n "$NIX_LIB64_IN_SELF_RPATH" ]; then
export NIX_LDFLAGS="-rpath $out/lib64 $NIX_LDFLAGS"
# Add $1/lib* into rpaths.
_addRpathPrefix() {
if [ "$NIX_NO_SELF_RPATH" != 1 ]; then
export NIX_LDFLAGS="-rpath $1/lib $NIX_LDFLAGS"
if [ -n "$NIX_LIB64_IN_SELF_RPATH" ]; then
export NIX_LDFLAGS="-rpath $1/lib64 $NIX_LDFLAGS"
fi
if [ -n "$NIX_LIB32_IN_SELF_RPATH" ]; then
export NIX_LDFLAGS="-rpath $1/lib32 $NIX_LDFLAGS"
fi
fi
if [ -n "$NIX_LIB32_IN_SELF_RPATH" ]; then
export NIX_LDFLAGS="-rpath $out/lib32 $NIX_LDFLAGS"
fi
fi
}
_addRpathPrefix "$out"
# Set the TZ (timezone) environment variable, otherwise commands like