3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/xcbuild/sdk.nix
Dan Peebles e86991e1e8 darwin: fix assorted xcbuild builds
This includes adding a new xcbuild-based libutil build to test the waters a bit there.
We'll need to get xcbuild into the stdenv bootstrap before we can make the main build,
but it's nice to see that it can work.
2017-10-12 07:16:22 -04:00

32 lines
783 B
Nix

{ stdenv, writeText, toolchainName, sdkName, xcbuild }:
let
SDKSettings = {
CanonicalName = sdkName;
DisplayName = sdkName;
Toolchains = [ toolchainName ];
Version = "10.10";
MaximumDeploymentTarget = "10.10";
isBaseSDK = "YES";
};
SystemVersion = {
ProductName = "Mac OS X";
ProductVersion = "10.10";
};
in
stdenv.mkDerivation {
name = "MacOSX.sdk";
buildInputs = [ xcbuild ];
buildCommand = ''
mkdir -p $out/
plutil -convert xml1 -o $out/SDKSettings.plist ${writeText "SDKSettings.json" (builtins.toJSON SDKSettings)}
mkdir -p $out/System/Library/CoreServices/
plutil -convert xml1 -o $out/System/Library/CoreServices/SystemVersion.plist ${writeText "SystemVersion.plist" (builtins.toJSON SystemVersion)}
'';
}