diff --git a/lib/systems/default.nix b/lib/systems/default.nix index cee09791bf54..1f4c4ad52867 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -298,8 +298,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