nixpkgs/pkgs/os-specific/darwin/cf-private/setup-hook.sh
2015-10-26 17:13:29 -07:00

12 lines
498 B
Bash

prependSearchPath() {
NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks ${NIX_CFLAGS_COMPILE/"-F@out@/Library/Frameworks"/}"
}
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/CoreFoundation"
}
preConfigureHooks+=(prependSearchPath linkWithRealCF)