add propagated builds where needed to darwin frameworks

This commit is contained in:
Jude Taylor 2015-10-28 12:14:42 -07:00
parent 1786f6bd4d
commit c62cf0b5b3
3 changed files with 21 additions and 7 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, xar, gzip, cpio, CF, pkgs }: { stdenv, fetchurl, xar, gzip, cpio, pkgs }:
let let
# sadly needs to be exported because security_tool needs it # sadly needs to be exported because security_tool needs it
@ -126,7 +126,7 @@ in rec {
__propagatedImpureHostDeps = [ "/usr/lib/libXplugin.1.dylib" ]; __propagatedImpureHostDeps = [ "/usr/lib/libXplugin.1.dylib" ];
propagatedBuildInputs = with frameworks; [ propagatedBuildInputs = with frameworks; [
OpenGL ApplicationServices Carbon IOKit CF CoreGraphics CoreServices CoreText OpenGL ApplicationServices Carbon IOKit pkgs.darwin.CF CoreGraphics CoreServices CoreText
]; ];
installPhase = '' installPhase = ''
@ -158,9 +158,16 @@ in rec {
--replace "QuartzCore/../Frameworks/CoreImage.framework/Headers" "CoreImage" --replace "QuartzCore/../Frameworks/CoreImage.framework/Headers" "CoreImage"
''; '';
}); });
Security = stdenv.lib.overrideDerivation super.Security (drv: {
setupHook = ./security-setup-hook.sh;
});
}; };
bareFrameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix { inherit frameworks libs CF; }); bareFrameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix {
inherit frameworks libs;
inherit (pkgs.darwin) CF cf-private libobjc;
});
frameworks = bareFrameworks // overrides bareFrameworks; frameworks = bareFrameworks // overrides bareFrameworks;

View File

@ -2,7 +2,7 @@
# Epic weird knot-tying happening here. # Epic weird knot-tying happening here.
# TODO: clean up the process for generating this and include it # TODO: clean up the process for generating this and include it
{ frameworks, libs, CF }: { frameworks, libs, CF, libobjc, cf-private }:
with frameworks; with libs; { with frameworks; with libs; {
AGL = [ Carbon OpenGL ]; AGL = [ Carbon OpenGL ];
@ -21,7 +21,7 @@ with frameworks; with libs; {
Automator = []; Automator = [];
CFNetwork = [ CF ]; CFNetwork = [ CF ];
CalendarStore = []; CalendarStore = [];
Cocoa = []; Cocoa = [ Foundation ];
Collaboration = []; Collaboration = [];
CoreAudio = [ CF IOKit ]; CoreAudio = [ CF IOKit ];
CoreAudioKit = [ AudioUnit ]; CoreAudioKit = [ AudioUnit ];
@ -32,7 +32,7 @@ with frameworks; with libs; {
CoreMIDIServer = []; CoreMIDIServer = [];
CoreMedia = [ ApplicationServices AudioToolbox CoreAudio CF CoreGraphics CoreVideo ]; CoreMedia = [ ApplicationServices AudioToolbox CoreAudio CF CoreGraphics CoreVideo ];
CoreMediaIO = [ CF CoreMedia ]; CoreMediaIO = [ CF CoreMedia ];
CoreText = [ CF CoreGraphics ]; CoreText = [ CF CoreGraphics cf-private ];
CoreVideo = [ ApplicationServices CF CoreGraphics IOSurface OpenGL ]; CoreVideo = [ ApplicationServices CF CoreGraphics IOSurface OpenGL ];
CoreWLAN = [ SecurityFoundation ]; CoreWLAN = [ SecurityFoundation ];
DVComponentGlue = [ CoreServices QuickTime ]; DVComponentGlue = [ CoreServices QuickTime ];
@ -46,7 +46,7 @@ with frameworks; with libs; {
ExceptionHandling = []; ExceptionHandling = [];
FWAUserLib = []; FWAUserLib = [];
ForceFeedback = [ CF IOKit ]; ForceFeedback = [ CF IOKit ];
Foundation = [ CF Security ApplicationServices AppKit SystemConfiguration ]; Foundation = [ CF libobjc Security ApplicationServices AppKit SystemConfiguration ];
GLKit = [ CF ]; GLKit = [ CF ];
GLUT = [ GL OpenGL ]; GLUT = [ GL OpenGL ];
GSS = []; GSS = [];

View File

@ -0,0 +1,7 @@
noDeprecatedDeclarations() {
# Security.framework has about 2000 deprecated constants, all of which the user will be
# warned about at compilation time
NIX_CFLAGS_COMPILE+=" -Wno-deprecated-declarations"
}
envHooks+=(noDeprecatedDeclarations)