diff options
author | Adam Joseph <adam@westernsemico.com> | 2023-06-18 14:39:09 -0700 |
---|---|---|
committer | Adam Joseph <adam@westernsemico.com> | 2023-06-18 14:39:09 -0700 |
commit | 6c9be0bf7a004a8c5da4b404bb68c3c0f3a92baf (patch) | |
tree | 43b4a4eb779e8cd9f3314d7e6b267304e0fe913d | |
parent | dc4d2e88a7e5244aed993ae692e1657b67389a07 (diff) | |
download | nixpkgs-6c9be0bf7a004a8c5da4b404bb68c3c0f3a92baf.tar nixpkgs-6c9be0bf7a004a8c5da4b404bb68c3c0f3a92baf.tar.gz nixpkgs-6c9be0bf7a004a8c5da4b404bb68c3c0f3a92baf.tar.bz2 nixpkgs-6c9be0bf7a004a8c5da4b404bb68c3c0f3a92baf.tar.lz nixpkgs-6c9be0bf7a004a8c5da4b404bb68c3c0f3a92baf.tar.xz nixpkgs-6c9be0bf7a004a8c5da4b404bb68c3c0f3a92baf.tar.zst nixpkgs-6c9be0bf7a004a8c5da4b404bb68c3c0f3a92baf.zip |
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
-rw-r--r-- | lib/systems/default.nix | 3 |
1 files changed, 1 insertions, 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"}" |