about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/xcbuild/platforms.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/xcbuild/platforms.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/xcbuild/platforms.nix30
1 files changed, 15 insertions, 15 deletions
diff --git a/nixpkgs/pkgs/development/tools/xcbuild/platforms.nix b/nixpkgs/pkgs/development/tools/xcbuild/platforms.nix
index e20dc878b535..0108ac8ef697 100644
--- a/nixpkgs/pkgs/development/tools/xcbuild/platforms.nix
+++ b/nixpkgs/pkgs/development/tools/xcbuild/platforms.nix
@@ -1,4 +1,4 @@
-{ runCommand, lib, sdks, xcodePlatform, writeText }:
+{ stdenv, runCommand, lib, sdks, xcodePlatform, writeText }:
 
 let
 
@@ -15,23 +15,23 @@ let
   };
 
   # These files are all based off of Xcode spec fies found in
-  # /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Speciications/.
+  # /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/PrivatePlugIns/IDEOSXSupportCore.ideplugin/Contents/Resources.
 
-  # Based off of the MacOSX Architectures.xcpsec file. All i386 stuff
-  # is removed because NixPkgs only supports darwin-x86_64.
+  # Based off of the "MacOSX Architectures.xcspec" file. All i386 stuff
+  # is removed because NixPkgs only supports darwin-x86_64 and darwin-arm64.
   Architectures = [
     {
       Identifier = "Standard";
       Type = "Architecture";
-      Name = "Standard Architectures (64-bit Intel)";
-      RealArchitectures = [ "x86_64" ];
+      Name = "Standard Architectures (Apple Silicon, 64-bit Intel)";
+      RealArchitectures = [ "arm64" "x86_64" ];
       ArchitectureSetting = "ARCHS_STANDARD";
     }
     {
       Identifier = "Universal";
       Type = "Architecture";
-      Name = "Universal (64-bit Intel)";
-      RealArchitectures = [ "x86_64" ];
+      Name = "Universal (Apple Silicon, 64-bit Intel)";
+      RealArchitectures = [ "arm64" "x86_64" ];
       ArchitectureSetting = "ARCHS_STANDARD_32_64_BIT";
     }
     {
@@ -43,25 +43,25 @@ let
     {
       Identifier = "Standard64bit";
       Type = "Architecture";
-      Name = "64-bit Intel";
-      RealArchitectures = [ "x86_64" ];
+      Name = "Apple Silicon, 64-bit Intel";
+      RealArchitectures = [ "arm64" "x86_64" ];
       ArchitectureSetting = "ARCHS_STANDARD_64_BIT";
     }
     {
-      Identifier = "x86_64";
+      Identifier = if stdenv.isAarch64 then "arm64" else "x86_64";
       Type = "Architecture";
-      Name = "Intel 64-bit";
+      Name = "Apple Silicon or Intel 64-bit";
     }
     {
       Identifier = "Standard_Including_64_bit";
       Type = "Architecture";
       Name = "Standard Architectures (including 64-bit)";
-      RealArchitectures = [ "x86_64" ];
+      RealArchitectures = [ "arm64" "x86_64" ];
       ArchitectureSetting = "ARCHS_STANDARD_INCLUDING_64_BIT";
     }
   ];
 
-  # Based off of the MacOSX Package Types.xcpsec file. Only keep the
+  # Based off of the "MacOSX Package Types.xcspec" file. Only keep the
   # bare minimum needed.
   PackageTypes = [
     {
@@ -169,7 +169,7 @@ let
     }
   ];
 
-  # Based off of the MacOSX Product Types.xcpsec file. All
+  # Based off of the "MacOSX Product Types.xcspec" file. All
   # bundles/wrapper are removed, because we prefer dynamic products in
   # NixPkgs.
   ProductTypes = [