lib/systems: remove redundant test from selectEmulator

Commit eef4bbd82f changed the conditional in selectEmulator from
`isCompatible` (which examines only the CPU, rather than the entire
platform) to `canExecute`.  This made the first conjunct redundant.
Let's drop the redundant part.

https://github.com/NixOS/nixpkgs/pull/238331#discussion_r1233277119
This commit is contained in:
Adam Joseph 2023-06-18 14:39:09 -07:00
parent dc4d2e88a7
commit 6c9be0bf7a

View File

@ -226,8 +226,7 @@ rec {
};
wine = (pkgs.winePackagesFor "wine${toString final.parsed.cpu.bits}").minimal;
in
if final.parsed.kernel.name == pkgs.stdenv.hostPlatform.parsed.kernel.name &&
pkgs.stdenv.hostPlatform.canExecute final
if pkgs.stdenv.hostPlatform.canExecute final
then "${pkgs.runtimeShell} -c '\"$@\"' --"
else if final.isWindows
then "${wine}/bin/wine${lib.optionalString (final.parsed.cpu.bits == 64) "64"}"