summary refs log tree commit diff
path: root/pkgs/development/tools/xcbuild/platform.nix
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2016-11-10 02:20:12 -0600
committerMatthew Bauer <mjbauer95@gmail.com>2016-11-15 19:13:05 -0600
commit0b6bfa49d5b6c70ee2844c292044c35a39fabf96 (patch)
tree499b794f96d7f1427bc1a48be144371327ef233a /pkgs/development/tools/xcbuild/platform.nix
parent25485ece2a3568fd84291ce4d600199c53754619 (diff)
downloadnixpkgs-0b6bfa49d5b6c70ee2844c292044c35a39fabf96.tar
nixpkgs-0b6bfa49d5b6c70ee2844c292044c35a39fabf96.tar.gz
nixpkgs-0b6bfa49d5b6c70ee2844c292044c35a39fabf96.tar.bz2
nixpkgs-0b6bfa49d5b6c70ee2844c292044c35a39fabf96.tar.lz
nixpkgs-0b6bfa49d5b6c70ee2844c292044c35a39fabf96.tar.xz
nixpkgs-0b6bfa49d5b6c70ee2844c292044c35a39fabf96.tar.zst
nixpkgs-0b6bfa49d5b6c70ee2844c292044c35a39fabf96.zip
xcbuild: Move extra specs to platform
Diffstat (limited to 'pkgs/development/tools/xcbuild/platform.nix')
-rw-r--r--pkgs/development/tools/xcbuild/platform.nix139
1 files changed, 139 insertions, 0 deletions
diff --git a/pkgs/development/tools/xcbuild/platform.nix b/pkgs/development/tools/xcbuild/platform.nix
index eea8ea5f9eb..c54f7f83e0e 100644
--- a/pkgs/development/tools/xcbuild/platform.nix
+++ b/pkgs/development/tools/xcbuild/platform.nix
@@ -12,6 +12,138 @@ let
     ProjectName = "OSXPlatformSupport";
   };
 
+  Tools = [
+    {
+      Identifier = "com.apple.build-tools.nmedit";
+      Type = "Tool";
+      Name = "Nmedit";
+    }
+    {
+      Identifier = "com.apple.compilers.resource-copier";
+      Type = "Tool";
+      Name = "Resource Copier";
+    }
+    {
+      Identifier = "com.apple.compilers.yacc";
+      Type = "Tool";
+      Name = "Yacc";
+      InputFileTypes = [ "sourcecode.yacc" ];
+      ExecDescription = "Yacc $(InputFile)";
+    }
+    {
+      Identifier = "com.apple.compilers.lex";
+      Type = "Tool";
+      Name = "Lex";
+      ExecDescription = "Lex $(InputFile)";
+      InputFileTypes = [ "sourcecode.lex" ];
+    }
+  ];
+
+  Architectures = [
+    {
+		  Identifier = "Standard";
+	    Type = "Architecture";
+		  Name = "Standard Architectures (64-bit Intel)";
+		  RealArchitectures = [ "x86_64" ];
+      ArchitectureSetting = "ARCHS_STANDARD";
+    }
+    {
+      Identifier = "Universal";
+      Type = "Architecture";
+      Name = "Universal (64-bit Intel)";
+      RealArchitectures = [ "x86_64" ];
+      ArchitectureSetting = "ARCHS_STANDARD_32_64_BIT";
+    }
+    {
+      Identifier = "Native";
+      Type = "Architecture";
+      Name = "Native Architecture of Build Machine";
+      ArchitectureSetting = "NATIVE_ARCH_ACTUAL";
+    }
+    {
+      Identifier = "Standard64bit";
+      Type = "Architecture";
+      Name = "64-bit Intel";
+      RealArchitectures = [ "x86_64" ];
+      ArchitectureSetting = "ARCHS_STANDARD_64_BIT";
+    }
+    {
+      Identifier = "x86_64";
+      Type = "Architecture";
+      Name = "Intel 64-bit";
+    }
+    {
+      Identifier = "Standard_Including_64_bit";
+      Type = "Architecture";
+      Name = "Standard Architectures (including 64-bit)";
+      RealArchitectures = [ "x86_64" ];
+      ArchitectureSetting = "ARCHS_STANDARD_INCLUDING_64_BIT";
+    }
+  ];
+
+  PackageTypes = [
+    {
+      Identifier = "com.apple.package-type.mach-o-executable";
+      Type = "PackageType";
+      Name = "Mach-O Executable";
+      DefaultBuildSettings = {
+        EXECUTABLE_NAME = "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)";
+        EXECUTABLE_PATH = "$(EXECUTABLE_NAME)";
+      };
+      ProductReference = {
+        FileType = "compiled.mach-o.executable";
+        Name = "$(EXECUTABLE_NAME)";
+      };
+    }
+    {
+      Identifier = "com.apple.package-type.mach-o-objfile";
+      Type = "PackageType";
+      Name = "Mach-O Object File";
+      DefaultBuildSettings = {
+        EXECUTABLE_NAME = "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)";
+        EXECUTABLE_PATH = "$(EXECUTABLE_NAME)";
+      };
+      ProductReference = {
+        FileType = "compiled.mach-o.objfile";
+        Name = "$(EXECUTABLE_NAME)";
+      };
+    }
+    {
+      Identifier = "com.apple.package-type.mach-o-dylib";
+      Type = "PackageType";
+      Name = "Mach-O Dynamic Library";
+      DefaultBuildSettings = {
+        EXECUTABLE_NAME = "$(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_VARIANT_SUFFIX)$(EXECUTABLE_SUFFIX)";
+        EXECUTABLE_PATH = "$(EXECUTABLE_NAME)";
+      };
+      ProductReference = {
+        FileType = "compiled.mach-o.dylib";
+        Name = "$(EXECUTABLE_NAME)";
+      };
+    }
+  ];
+
+  ProductTypes = [
+    {
+      Identifier = "com.apple.product-type.tool";
+      Type = "ProductType";
+      Name = "Command-line Tool";
+      PackageTypes = [ "com.apple.package-type.mach-o-executable" ];
+    }
+    {
+      Identifier = "com.apple.product-type.objfile";
+      Type = "ProductType";
+      Name = "Object File";
+      PackageTypes = [ "com.apple.package-type.mach-o-objfile" ];
+    }
+    {
+      Identifier = "com.apple.product-type.library.dynamic";
+      Type = "ProductType";
+      Name = "Dynamic Library";
+      PackageTypes = [ "com.apple.package-type.mach-o-dylib" ];
+    }
+  ];
+
 in
 
 stdenv.mkDerivation {
@@ -24,6 +156,13 @@ stdenv.mkDerivation {
     plutil -convert xml1 -o Info.plist ${writeText "Info.plist" (builtins.toJSON Info)}
     plutil -convert xml1 -o version.plist ${writeText "version.plist" (builtins.toJSON Version)}
 
+    mkdir -p $out/Developer/Library/Xcode/Specifications/
+    cd $out/Developer/Library/Xcode/Specifications/
+    plutil -convert xml1 -o Tools.xcspec ${writeText "Tools.xcspec" (builtins.toJSON Tools)}
+    plutil -convert xml1 -o Architectures.xcspec ${writeText "Architectures.xcspec" (builtins.toJSON Architectures)}
+    plutil -convert xml1 -o PackageTypes.xcspec ${writeText "PackageTypes.xcspec" (builtins.toJSON PackageTypes)}
+    plutil -convert xml1 -o ProductTypes.xcspec ${writeText "ProductTypes.xcspec" (builtins.toJSON ProductTypes)}
+
     mkdir -p $out/Developer/SDKs/
     cd $out/Developer/SDKs/
     ln -s ${sdk}