···72 else
73 targetPlatform.parsed.kernel.name;
7475- swiftArch = stdenv.hostPlatform.darwinArch;
00007677 # On Darwin, a `.swiftmodule` is a subdirectory in `lib/swift/<OS>`,
78 # containing binaries for supported archs. On other platforms, binaries are
···72 else
73 targetPlatform.parsed.kernel.name;
7475+ # This causes swiftPackages.XCTest to fail to build on aarch64-linux
76+ # as I believe this is because Apple calls the architecture aarch64
77+ # on Linux rather than arm64 when used with macOS.
78+ swiftArch =
79+ if hostPlatform.isDarwin then hostPlatform.darwinArch else targetPlatform.parsed.cpu.name;
8081 # On Darwin, a `.swiftmodule` is a subdirectory in `lib/swift/<OS>`,
82 # containing binaries for supported archs. On other platforms, binaries are