about summary refs log tree commit diff
path: root/pkgs/development/tools/xcbuild/developer.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/xcbuild/developer.nix')
-rw-r--r--pkgs/development/tools/xcbuild/developer.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/tools/xcbuild/developer.nix b/pkgs/development/tools/xcbuild/developer.nix
new file mode 100644
index 000000000000..993a5fb861a2
--- /dev/null
+++ b/pkgs/development/tools/xcbuild/developer.nix
@@ -0,0 +1,33 @@
+{stdenv, platform, toolchain, xcbuild, writeText}:
+
+let
+
+AbstractAssetCatalog = {
+    Type = "FileType";
+    Identifier = "folder.abstractassetcatalog";
+    BasedOn = "wrapper";
+
+    UTI = "com.apple.dt.abstractassetcatalog";
+    IsTransparent = "NO";
+};
+
+in
+
+stdenv.mkDerivation {
+  name = "Xcode.app";
+  buildInputs = [ xcbuild ];
+  buildCommand = ''
+    mkdir -p $out/Contents/Developer/Library/Xcode/Specifications/
+    cp ${xcbuild}/Library/Xcode/Specifications/* $out/Contents/Developer/Library/Xcode/Specifications/
+
+    plutil -convert xml1 ${writeText "folder.abstractassetcatalog" (builtins.toJSON AbstractAssetCatalog)} -o $out/Contents/Developer/Library/Xcode/Specifications/folder.abstractassetcatalog.xcspec
+
+    mkdir -p $out/Contents/Developer/Platforms/
+    cd $out/Contents/Developer/Platforms/
+    ln -s ${platform}
+
+    mkdir -p $out/Contents/Developer/Toolchains/
+    cd $out/Contents/Developer/Toolchains/
+    ln -s ${toolchain}
+  '';
+}