From c62cf0b5b3774afb361ae22f154e54fdb572c084 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Wed, 28 Oct 2015 12:14:42 -0700 Subject: [PATCH] add propagated builds where needed to darwin frameworks --- pkgs/os-specific/darwin/apple-sdk/default.nix | 13 ++++++++++--- pkgs/os-specific/darwin/apple-sdk/frameworks.nix | 8 ++++---- .../darwin/apple-sdk/security-setup-hook.sh | 7 +++++++ 3 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index ea899b6abcfc..24083060e546 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, xar, gzip, cpio, CF, pkgs }: +{ stdenv, fetchurl, xar, gzip, cpio, pkgs }: let # sadly needs to be exported because security_tool needs it @@ -126,7 +126,7 @@ in rec { __propagatedImpureHostDeps = [ "/usr/lib/libXplugin.1.dylib" ]; propagatedBuildInputs = with frameworks; [ - OpenGL ApplicationServices Carbon IOKit CF CoreGraphics CoreServices CoreText + OpenGL ApplicationServices Carbon IOKit pkgs.darwin.CF CoreGraphics CoreServices CoreText ]; installPhase = '' @@ -158,9 +158,16 @@ in rec { --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; diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix index 3889ba211a46..051919d2bd4a 100644 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -2,7 +2,7 @@ # Epic weird knot-tying happening here. # TODO: clean up the process for generating this and include it -{ frameworks, libs, CF }: +{ frameworks, libs, CF, libobjc, cf-private }: with frameworks; with libs; { AGL = [ Carbon OpenGL ]; @@ -21,7 +21,7 @@ with frameworks; with libs; { Automator = []; CFNetwork = [ CF ]; CalendarStore = []; - Cocoa = []; + Cocoa = [ Foundation ]; Collaboration = []; CoreAudio = [ CF IOKit ]; CoreAudioKit = [ AudioUnit ]; @@ -32,7 +32,7 @@ with frameworks; with libs; { CoreMIDIServer = []; CoreMedia = [ ApplicationServices AudioToolbox CoreAudio CF CoreGraphics CoreVideo ]; CoreMediaIO = [ CF CoreMedia ]; - CoreText = [ CF CoreGraphics ]; + CoreText = [ CF CoreGraphics cf-private ]; CoreVideo = [ ApplicationServices CF CoreGraphics IOSurface OpenGL ]; CoreWLAN = [ SecurityFoundation ]; DVComponentGlue = [ CoreServices QuickTime ]; @@ -46,7 +46,7 @@ with frameworks; with libs; { ExceptionHandling = []; FWAUserLib = []; ForceFeedback = [ CF IOKit ]; - Foundation = [ CF Security ApplicationServices AppKit SystemConfiguration ]; + Foundation = [ CF libobjc Security ApplicationServices AppKit SystemConfiguration ]; GLKit = [ CF ]; GLUT = [ GL OpenGL ]; GSS = []; diff --git a/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh new file mode 100644 index 000000000000..b6a129acb19f --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh @@ -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)