diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2016-06-25 23:45:55 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2016-11-15 18:57:20 -0600 |
commit | de87138b9ac14a466fe5f0b43462542308913cb0 (patch) | |
tree | 5abe617bea36ed32d39f855f5fb514048a575ee3 /pkgs/development/tools/xcbuild/sdk.nix | |
parent | d05d063572915a9e9a5955566ac7c797e97ca405 (diff) | |
download | nixlib-de87138b9ac14a466fe5f0b43462542308913cb0.tar nixlib-de87138b9ac14a466fe5f0b43462542308913cb0.tar.gz nixlib-de87138b9ac14a466fe5f0b43462542308913cb0.tar.bz2 nixlib-de87138b9ac14a466fe5f0b43462542308913cb0.tar.lz nixlib-de87138b9ac14a466fe5f0b43462542308913cb0.tar.xz nixlib-de87138b9ac14a466fe5f0b43462542308913cb0.tar.zst nixlib-de87138b9ac14a466fe5f0b43462542308913cb0.zip |
xcbuild: add wrapper
Also updates xcbuild version. This changes the raw string expressions into nix expressions that are then converted into json by builtins.toJSON. Then, converted to Plist XML by Apple's plutil. Sadly, xcbuild does not support using raw JSON but Apple's plutil does so we just convert the file from JSON to XML using Apple's plutil. The result is not ideal but it looks like all OS X systems have working plutil's. - set mac version to 10.10 - add setup hook.
Diffstat (limited to 'pkgs/development/tools/xcbuild/sdk.nix')
-rw-r--r-- | pkgs/development/tools/xcbuild/sdk.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/tools/xcbuild/sdk.nix b/pkgs/development/tools/xcbuild/sdk.nix new file mode 100644 index 000000000000..11131fcd9cfa --- /dev/null +++ b/pkgs/development/tools/xcbuild/sdk.nix @@ -0,0 +1,31 @@ +{ 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 = "nix.nixpkgs.sdk"; + buildInputs = [ xcbuild ]; + buildCommand = '' + mkdir -p $out/ + /usr/bin/plutil -convert xml1 -o $out/SDKSettings.plist ${writeText "SDKSettings.json" (builtins.toJSON SDKSettings)} + + mkdir -p $out/System/Library/CoreServices/ + /usr/bin/plutil -convert xml1 -o $out/System/Library/CoreServices/SystemVersion.plist ${writeText "SystemVersion.plist" (builtins.toJSON SystemVersion)} + ''; +} |