···7272 else
7373 targetPlatform.parsed.kernel.name;
74747575- swiftArch = stdenv.hostPlatform.darwinArch;
7575+ # This causes swiftPackages.XCTest to fail to build on aarch64-linux
7676+ # as I believe this is because Apple calls the architecture aarch64
7777+ # on Linux rather than arm64 when used with macOS.
7878+ swiftArch =
7979+ if hostPlatform.isDarwin then hostPlatform.darwinArch else targetPlatform.parsed.cpu.name;
76807781 # On Darwin, a `.swiftmodule` is a subdirectory in `lib/swift/<OS>`,
7882 # containing binaries for supported archs. On other platforms, binaries are