darwin-CF: use @rpath for library id and add an rpath entry for CF based on NIX_COREFOUNDATION_RPATH

This commit is contained in:
Daiderd Jordan 2017-07-21 20:29:18 +02:00
parent 0f043d497d
commit 92652b4d79
No known key found for this signature in database
GPG key ID: D02435D05B810C96
3 changed files with 6 additions and 1 deletions

View file

@ -145,6 +145,10 @@ if [ "$NIX_@infixSalt@_DONT_SET_RPATH" != 1 ]; then
fi
done
done
if [ -n "${NIX_COREFOUNDATION_RPATH:-}" ]; then
extraAfter+=(-rpath $NIX_COREFOUNDATION_RPATH)
fi
fi

View file

@ -18,7 +18,7 @@ appleDerivation {
--replace "/usr/sbin/" "" \
--replace "/bin/" "" \
--replace "INSTALLNAME=/System" "INSTALLNAME=$out" \
--replace "install_name_tool -id /System" "install_name_tool -id $out" \
--replace "install_name_tool -id /System/Library/Frameworks" "install_name_tool -id @rpath" \
--replace 'chown -RH -f root:wheel $(DSTBASE)/CoreFoundation.framework' "" \
--replace 'chmod -RH' 'chmod -R'

View file

@ -300,6 +300,7 @@ in rec {
targetPlatform = localSystem;
preHook = commonPreHook + ''
export NIX_COREFOUNDATION_RPATH=${pkgs.darwin.CF}/Library/Frameworks
export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
'';