From 4c6e132c7ed1928d347e48dc1f2ea6013f48cd6d Mon Sep 17 00:00:00 2001 From: Ivan Trubach Date: Sat, 4 May 2024 08:23:44 +0300 Subject: [PATCH] =?UTF-8?q?lib/systems:=20use=20execline=E2=80=99s=20exec?= =?UTF-8?q?=20instead=20of=20runtimeShell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/systems/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 0b8aeda208e3..6c5cdb853348 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -282,8 +282,11 @@ let }; wine = (pkgs.winePackagesFor "wine${toString final.parsed.cpu.bits}").minimal; in + # Note: we guarantee that the return value is either `null` or a path + # to an emulator program. That is, if an emulator requires additional + # arguments, a wrapper should be used. if pkgs.stdenv.hostPlatform.canExecute final - then "${pkgs.runtimeShell} -c '\"$@\"' --" + then "${pkgs.execline}/bin/exec" else if final.isWindows then "${wine}/bin/wine${optionalString (final.parsed.cpu.bits == 64) "64"}" else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux && final.qemuArch != null