darwin-frameworks: replace cf-private and move it's setup-hook

The only remaining use-case for cf-private are symbols that are not
available in the opensource build.  This generally solved the problem
because of it's setup-hook.
This commit is contained in:
Daiderd Jordan
2019-07-03 22:20:09 +02:00
parent c2b76fa13c
commit 73d9cac377
5 changed files with 13 additions and 71 deletions
@@ -0,0 +1,9 @@
linkSystemCoreFoundationFramework() {
NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks $NIX_CFLAGS_COMPILE"
# 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/Versions/A/CoreFoundation"
}
preConfigureHooks+=(linkSystemCoreFoundationFramework)
@@ -187,6 +187,10 @@ in rec {
];
});
CoreFoundation = stdenv.lib.overrideDerivation super.CoreFoundation (drv: {
setupHook = ./cf-setup-hook.sh;
});
CoreMedia = stdenv.lib.overrideDerivation super.CoreMedia (drv: {
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [
"/System/Library/Frameworks/CoreImage.framework"
@@ -222,7 +226,7 @@ in rec {
bareFrameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix {
inherit frameworks libs;
inherit (pkgs.darwin) cf-private libobjc;
inherit (pkgs.darwin) libobjc;
});
frameworks = bareFrameworks // overrides bareFrameworks;
@@ -2,7 +2,7 @@
# Epic weird knot-tying happening here.
# TODO: clean up the process for generating this and include it
{ frameworks, libs, libobjc, cf-private }:
{ frameworks, libs, libobjc, }:
with frameworks; with libs; {
AGL = [ Carbon OpenGL ];
@@ -47,8 +47,8 @@ with frameworks; with libs; {
ExceptionHandling = [];
FWAUserLib = [];
ForceFeedback = [ IOKit ];
Foundation = [ cf-private libobjc Security ApplicationServices SystemConfiguration ];
GLKit = [ ];
Foundation = [ libobjc CoreFoundation Security ApplicationServices SystemConfiguration ];
GLKit = [];
GLUT = [ OpenGL ];
GSS = [];
GameController = [];