diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2014-08-24 19:05:56 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2014-08-24 19:07:47 +0200 |
commit | def75f028240ce2d38ec8e0707cc886c8b7596a4 (patch) | |
tree | 0085b5b1a62a5b9430aa48eace3b9046c4ed9319 /pkgs/stdenv/generic/setup.sh | |
parent | 4e72b61de9bdb0c1216632e743c04f5da592b3ba (diff) | |
download | nixlib-def75f028240ce2d38ec8e0707cc886c8b7596a4.tar nixlib-def75f028240ce2d38ec8e0707cc886c8b7596a4.tar.gz nixlib-def75f028240ce2d38ec8e0707cc886c8b7596a4.tar.bz2 nixlib-def75f028240ce2d38ec8e0707cc886c8b7596a4.tar.lz nixlib-def75f028240ce2d38ec8e0707cc886c8b7596a4.tar.xz nixlib-def75f028240ce2d38ec8e0707cc886c8b7596a4.tar.zst nixlib-def75f028240ce2d38ec8e0707cc886c8b7596a4.zip |
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.
Diffstat (limited to 'pkgs/stdenv/generic/setup.sh')
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 5da7f773732f..6291f4a367b7 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -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" - fi - if [ -n "$NIX_LIB32_IN_SELF_RPATH" ]; then - export NIX_LDFLAGS="-rpath $out/lib32 $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 -fi +} +_addRpathPrefix "$out" # Set the TZ (timezone) environment variable, otherwise commands like |