3
0
Fork 0
forked from mirrors/nixpkgs

darwin-frameworks: use the system CF when frameworks are used

This will get propagated down to other libraries loaded because
everything in nixpkgs references CF based on an rpath entry.
This commit is contained in:
Daiderd Jordan 2017-07-22 13:31:48 +02:00
parent 92652b4d79
commit cc1bfbd9a7
No known key found for this signature in database
GPG key ID: D02435D05B810C96
2 changed files with 10 additions and 1 deletions

View file

@ -134,7 +134,7 @@ let
propagatedBuildInputs = deps;
# don't use pure CF for dylibs that depend on frameworks
setupHook = ../../../build-support/setup-hooks/fix-darwin-frameworks.sh;
setupHook = ./framework-setup-hook.sh;
# allows building the symlink tree
__impureHostDeps = [ "/System/Library/Frameworks/${name}.framework" ];

View file

@ -0,0 +1,9 @@
# This configures the stdenv to use /System/Library/Frameworks/CoreFoundation.framework
# instead of the nix version by including the system frameworks path
# as an rpath entry when creating binaries.
useSystemCoreFoundationFramework () {
export NIX_COREFOUNDATION_RPATH=/System/Library/Frameworks
}
envHooks+=(useSystemCoreFoundationFramework)