summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/apple-sdk
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/darwin/apple-sdk')
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/default.nix22
1 files changed, 7 insertions, 15 deletions
diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix
index c23a2148143..71574998885 100644
--- a/pkgs/os-specific/darwin/apple-sdk/default.nix
+++ b/pkgs/os-specific/darwin/apple-sdk/default.nix
@@ -1,30 +1,22 @@
-{ stdenv, fetchurl, xar, xz, cpio, pkgs, python, lib }:
+{ stdenv, fetchurl, xar, cpio, pkgs, python, pbzx, lib }:
 
 let
-  # TODO: make this available to other packages and generalize the unpacking a bit
-  # from https://gist.github.com/pudquick/ff412bcb29c9c1fa4b8d
-  # This isn't needed until we get to SDK 10.11, but that presents other challenges
-  # unpbzx = fetchurl {
-  #   url    = "https://gist.githubusercontent.com/pudquick/ff412bcb29c9c1fa4b8d/raw/24b25538ea8df8d0634a2a6189aa581ccc6a5b4b/parse_pbzx2.py";
-  #   sha256 = "0jgp6qbfl36i0jlz7as5zk2w20z4ca8wlrhdw49lwsld6wi3rfhc";
-  # };
-
   # sadly needs to be exported because security_tool needs it
   sdk = stdenv.mkDerivation rec {
-    version = "10.10";
+    version = "10.12";
     name    = "MacOS_SDK-${version}";
 
-    # This URL comes from https://swscan.apple.com/content/catalogs/others/index-10.10.merged-1.sucatalog, which we found by:
+    # This URL comes from https://swscan.apple.com/content/catalogs/others/index-10.12.merged-1.sucatalog, which we found by:
     #  1. Google: site:swscan.apple.com and look for a name that seems appropriate for your version
     #  2. In the resulting file, search for a file called DevSDK ending in .pkg
     #  3. ???
     #  4. Profit
     src = fetchurl {
-      url    = "http://swcdn.apple.com/content/downloads/22/52/031-45139/hcjjv7cm4n6yqk56ict73qqw15ikm5iaql/DevSDK_OSX1010.pkg";
-      sha256 = "08bxa93zw7r4vzs28j9giq2qyk3b68ky6jx1bb9850gflr3nvgq1";
+      url    = "http://swcdn.apple.com/content/downloads/28/09/091-29862/pafhn2u002b9slnrxzy9p86rpedycnjhb5/DevSDK_OSX1012.pkg";
+      sha256 = "1sggc70rypqwcjwr7ciavw8sczwll16cwqxdxrbw7r2qvy3b0nhx";
     };
 
-    buildInputs = [ xar xz cpio python ];
+    buildInputs = [ xar cpio python pbzx ];
 
     phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
     outputs = [ "out" "dev" "man" ];
@@ -37,7 +29,7 @@ let
       start="$(pwd)"
       mkdir -p $out
       cd $out
-      cat $start/Payload | gzip -d | cpio -idm
+      pbzx -n $start/Payload | cpio -idm
 
       mv usr/* .
       rmdir usr