mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
cf-private: prepend self to system includes
This commit is contained in:
parent
0a23e412b4
commit
5ea8770263
@ -34,7 +34,7 @@ let
|
||||
cd Library/Frameworks/QuartzCore.framework/Versions/A/Headers
|
||||
for file in CI*.h; do
|
||||
rm $file
|
||||
ln -s ../Frameworks/CoreImage.framework/Versions/A/Headers/$file
|
||||
ln -s ../Frameworks/CoreImage.framework/Headers/$file
|
||||
done
|
||||
'';
|
||||
|
||||
@ -151,10 +151,6 @@ in rec {
|
||||
};
|
||||
|
||||
overrides = super: {
|
||||
CoreText = stdenv.lib.overrideDerivation super.CoreText (drv: {
|
||||
propagatedNativeBuildInputs = drv.propagatedNativeBuildInputs ++ [ pkgs.darwin.cf-private ];
|
||||
});
|
||||
|
||||
QuartzCore = stdenv.lib.overrideDerivation super.QuartzCore (drv: {
|
||||
installPhase = drv.installPhase + ''
|
||||
f="$out/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h"
|
||||
|
@ -3,16 +3,28 @@
|
||||
let
|
||||
headers = [
|
||||
"CFAttributedString.h"
|
||||
"CFFileDescriptor.h"
|
||||
"CFFileSecurity.h"
|
||||
"CFNotificationCenter.h"
|
||||
"CFStringTokenizer.h"
|
||||
"CFURLEnumerator.h"
|
||||
"CoreFoundation.h"
|
||||
];
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "${CF.name}-private";
|
||||
unpackPhase = ":";
|
||||
buildPhase = ":";
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/CoreFoundation
|
||||
install -m 0644 ${osx_private_sdk}/PrivateSDK10.10.sparse.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/{${stdenv.lib.concatStringsSep "," headers}} $out/include/CoreFoundation
|
||||
dest=$out/Library/Frameworks/CoreFoundation.framework/Headers
|
||||
mkdir -p $dest
|
||||
pushd $dest
|
||||
for file in ${CF}/Library/Frameworks/CoreFoundation.framework/Headers/*; do
|
||||
ln -s $file
|
||||
done
|
||||
popd
|
||||
|
||||
install -m 0644 ${osx_private_sdk}/PrivateSDK10.10.sparse.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/{${stdenv.lib.concatStringsSep "," headers}} $dest
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
}
|
||||
|
12
pkgs/os-specific/darwin/cf-private/setup-hook.sh
Normal file
12
pkgs/os-specific/darwin/cf-private/setup-hook.sh
Normal file
@ -0,0 +1,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)
|
Loading…
Reference in New Issue
Block a user