about summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/cf-private/setup-hook.sh
blob: a83a1323bf83cb83f63fcb691345f99c5d8c7e14 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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)