mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
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:
parent
dc4d2e88a7
commit
6c9be0bf7a
1 changed files with 1 additions and 2 deletions
|
@ -226,8 +226,7 @@ rec {
|
||||||
};
|
};
|
||||||
wine = (pkgs.winePackagesFor "wine${toString final.parsed.cpu.bits}").minimal;
|
wine = (pkgs.winePackagesFor "wine${toString final.parsed.cpu.bits}").minimal;
|
||||||
in
|
in
|
||||||
if final.parsed.kernel.name == pkgs.stdenv.hostPlatform.parsed.kernel.name &&
|
if pkgs.stdenv.hostPlatform.canExecute final
|
||||||
pkgs.stdenv.hostPlatform.canExecute final
|
|
||||||
then "${pkgs.runtimeShell} -c '\"$@\"' --"
|
then "${pkgs.runtimeShell} -c '\"$@\"' --"
|
||||||
else if final.isWindows
|
else if final.isWindows
|
||||||
then "${wine}/bin/wine${lib.optionalString (final.parsed.cpu.bits == 64) "64"}"
|
then "${wine}/bin/wine${lib.optionalString (final.parsed.cpu.bits == 64) "64"}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue