Merge pull request #234861 from reckenrode/corefoundation-rpath
swift-corelibs: set NIX_COREFOUNDATION_RPATH in a hook
This commit is contained in:
commit
b7d4899ad5
3 changed files with 10 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchurl, ninja, python3, curl, libxml2, objc4, ICU }:
|
||||
{ lib, stdenv, fetchFromGitHub, fetchurl, makeSetupHook, ninja, python3, curl, libxml2, objc4, ICU }:
|
||||
|
||||
let
|
||||
# 10.12 adds a new sysdir.h that our version of CF in the main derivation depends on, but
|
||||
|
@ -104,4 +104,6 @@ stdenv.mkDerivation {
|
|||
ln -s Versions/Current/$i $base/$i
|
||||
done
|
||||
'';
|
||||
|
||||
darwinEnvHook = makeSetupHook { name = "darwin-env-hook"; } ./pure-corefoundation-hook.sh;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
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
|
|
@ -683,7 +683,6 @@ rec {
|
|||
targetPlatform = localSystem;
|
||||
|
||||
preHook = commonPreHook + ''
|
||||
export NIX_COREFOUNDATION_RPATH=${pkgs.darwin.CF}/Library/Frameworks
|
||||
export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue