diff options
Diffstat (limited to 'nixpkgs/pkgs/os-specific/darwin/cf-private/setup-hook.sh')
-rw-r--r-- | nixpkgs/pkgs/os-specific/darwin/cf-private/setup-hook.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/darwin/cf-private/setup-hook.sh b/nixpkgs/pkgs/os-specific/darwin/cf-private/setup-hook.sh new file mode 100644 index 000000000000..ae9ed5d15845 --- /dev/null +++ b/nixpkgs/pkgs/os-specific/darwin/cf-private/setup-hook.sh @@ -0,0 +1,12 @@ +prependSearchPath() { + NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks ${NIX_CFLAGS_COMPILE}" +} + +linkWithRealCF() { + # gross! many symbols (such as _OBJC_CLASS_$_NSArray) are defined in system CF, but not + # in the opensource release + # if the package needs private headers, we assume they also want to link with system CF + NIX_LDFLAGS+=" /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation" +} + +preConfigureHooks+=(prependSearchPath linkWithRealCF) |