From 6c9be0bf7a004a8c5da4b404bb68c3c0f3a92baf Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 18 Jun 2023 14:39:09 -0700 Subject: lib/systems: remove redundant test from selectEmulator Commit eef4bbd82f4c2 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 --- lib/systems/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 3558ce32fc8..eaf070ca711 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -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"}" -- cgit 1.4.1