diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index 73126ce1f5c..957b610f3a2 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -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" ]; diff --git a/pkgs/os-specific/darwin/apple-sdk/framework-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk/framework-setup-hook.sh new file mode 100644 index 00000000000..9d96a4adbaa --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdk/framework-setup-hook.sh @@ -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)