summary refs log tree commit diff
diff options
context:
space:
mode:
authorJude Taylor <me@jude.bio>2015-10-28 12:14:42 -0700
committerJude Taylor <me@jude.bio>2015-10-28 13:34:53 -0700
commitc62cf0b5b3774afb361ae22f154e54fdb572c084 (patch)
treed7e247f21b65a0af18d699cb6aa280f0ada5e282
parent1786f6bd4dd9821fad417402f9289021ee0f67ec (diff)
downloadnixpkgs-c62cf0b5b3774afb361ae22f154e54fdb572c084.tar
nixpkgs-c62cf0b5b3774afb361ae22f154e54fdb572c084.tar.gz
nixpkgs-c62cf0b5b3774afb361ae22f154e54fdb572c084.tar.bz2
nixpkgs-c62cf0b5b3774afb361ae22f154e54fdb572c084.tar.lz
nixpkgs-c62cf0b5b3774afb361ae22f154e54fdb572c084.tar.xz
nixpkgs-c62cf0b5b3774afb361ae22f154e54fdb572c084.tar.zst
nixpkgs-c62cf0b5b3774afb361ae22f154e54fdb572c084.zip
add propagated builds where needed to darwin frameworks
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/default.nix13
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/frameworks.nix8
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh7
3 files changed, 21 insertions, 7 deletions
diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix
index ea899b6abcf..24083060e54 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 3889ba211a4..051919d2bd4 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 00000000000..b6a129acb19
--- /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)