2020-11-19 08:14:51 +00:00
|
|
|
{ stdenvNoCC, fetchurl, newScope, pkgs
|
|
|
|
, xar, cpio, python3, pbzx }:
|
|
|
|
|
|
|
|
let
|
|
|
|
MacOSX-SDK = stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "MacOSX-SDK";
|
|
|
|
version = "11.0.0";
|
|
|
|
|
2021-05-31 04:48:04 +00:00
|
|
|
# https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
|
2020-11-19 08:14:51 +00:00
|
|
|
src = fetchurl {
|
2021-05-31 04:48:04 +00:00
|
|
|
url = "http://swcdn.apple.com/content/downloads/46/21/001-89745-A_56FM390IW5/v1um2qppgfdnam2e9cdqcqu2r6k8aa3lis/CLTools_macOSNMOS_SDK.pkg";
|
|
|
|
sha256 = "0n425smj4q1vxbza8fzwnk323fyzbbq866q32w288c44hl5yhwsf";
|
2020-11-19 08:14:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
darwinDontCodeSign = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cpio pbzx ];
|
|
|
|
|
|
|
|
outputs = [ "out" ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
pbzx $src | cpio -idm
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-31 04:48:04 +00:00
|
|
|
cd Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk
|
2020-11-19 08:14:51 +00:00
|
|
|
|
|
|
|
mkdir $out
|
|
|
|
cp -r System usr $out/
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
callPackage = newScope (packages // pkgs.darwin // { inherit MacOSX-SDK; });
|
|
|
|
|
|
|
|
packages = {
|
|
|
|
inherit (callPackage ./apple_sdk.nix {}) frameworks libs;
|
|
|
|
|
|
|
|
# TODO: this is nice to be private. is it worth the callPackage above?
|
|
|
|
# Probably, I don't think that callPackage costs much at all.
|
|
|
|
inherit MacOSX-SDK;
|
|
|
|
|
|
|
|
Libsystem = callPackage ./libSystem.nix {};
|
|
|
|
LibsystemCross = pkgs.darwin.Libsystem;
|
|
|
|
libcharset = callPackage ./libcharset.nix {};
|
|
|
|
libunwind = callPackage ./libunwind.nix {};
|
|
|
|
libnetwork = callPackage ./libnetwork.nix {};
|
|
|
|
objc4 = callPackage ./libobjc.nix {};
|
|
|
|
|
|
|
|
# questionable aliases
|
|
|
|
configd = pkgs.darwin.apple_sdk.frameworks.SystemConfiguration;
|
|
|
|
IOKit = pkgs.darwin.apple_sdk.frameworks.IOKit;
|
|
|
|
};
|
|
|
|
in packages
|