From bf8c1251708f013ecbcf3a1c6770a175e9161170 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 9 Aug 2017 23:00:56 +0200 Subject: [PATCH] cc-wrapper: fix LD_DYLD_PATH on darwin Having multiple compilers in the build environment would result in an invalid LD_DYLD_PATH like /usr/lib/dyld/usr/lib/dyld. Since the path is hardcoded in XNU it can't be anything but /usr/lib/dyld anyway. --- pkgs/build-support/cc-wrapper/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 01d1bbd7a5d5..905135e7adce 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -150,7 +150,7 @@ stdenv.mkDerivation { echo $dynamicLinker > $out/nix-support/dynamic-linker '' + (if targetPlatform.isDarwin then '' - printf "export LD_DYLD_PATH+=%q\n" "$dynamicLinker" >> $out/nix-support/setup-hook + printf "export LD_DYLD_PATH=%q\n" "$dynamicLinker" >> $out/nix-support/setup-hook '' else '' if [ -e ${libc_lib}/lib/32/ld-linux.so.2 ]; then echo ${libc_lib}/lib/32/ld-linux.so.2 > $out/nix-support/dynamic-linker-m32