nixpkgs/pkgs/os-specific/darwin/swift-corelibs/pure-corefoundation-hook.sh
Randy Eckenrode 0d3355a439
swift-corelibs: set NIX_COREFOUNDATION_RPATH in a hook
Closes #230870. Thanks to @eliasnaur for the test case and for rasining
awareness and to @veprbl for the work done on #111385.

This takes a slightly different approach from those two PRs. The hook is
set unconditionally. The stdenv bootstrap doesn’t really need CF at all,
so setting the hook is harmless. This simplifies things.
2023-05-29 15:43:58 -04:00

7 lines
246 B
Bash

usePureCoreFoundation() {
# Avoid overriding value set by the impure CF
if [ -z "${NIX_COREFOUNDATION_RPATH:-}" ]; then
export NIX_COREFOUNDATION_RPATH=@out@/Library/Frameworks
fi
}
addEnvHooks "$hostOffset" usePureCoreFoundation