diff --git a/pkgs/development/tools/xcbuild/platforms.nix b/pkgs/development/tools/xcbuild/platforms.nix index e20dc878b535..0108ac8ef697 100644 --- a/pkgs/development/tools/xcbuild/platforms.nix +++ b/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 = [ diff --git a/pkgs/development/tools/xcbuild/wrapper.nix b/pkgs/development/tools/xcbuild/wrapper.nix index 4f74b093717b..ca69bbe907df 100644 --- a/pkgs/development/tools/xcbuild/wrapper.nix +++ b/pkgs/development/tools/xcbuild/wrapper.nix @@ -28,7 +28,7 @@ let }; platforms = callPackage ./platforms.nix { - inherit sdks xcodePlatform; + inherit sdks xcodePlatform stdenv; }; xcconfig = writeText "nix.xcconfig" ''