From bd3ad658f8eb52c5a49054209d1942d28a64dfd4 Mon Sep 17 00:00:00 2001 From: Acid Bong Date: Sun, 6 Apr 2025 18:54:01 +0300 Subject: [PATCH] wine: keep argv0 of the wrapper In wine-10.1 and later, most executables are links to `bin/wine` and thus depend on the argv0 value, which (since `bin/wine` is a wrapper) wasn't set originally. This change sets argv0 to whatever link it was called from. Fixes #394549 --- pkgs/applications/emulators/wine/base.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/emulators/wine/base.nix b/pkgs/applications/emulators/wine/base.nix index 355630d9443a..80c5cf781b97 100644 --- a/pkgs/applications/emulators/wine/base.nix +++ b/pkgs/applications/emulators/wine/base.nix @@ -265,7 +265,7 @@ stdenv.mkDerivation ( hidden="$(dirname "$prog")/.$(basename "$prog")" mv "$prog" "$hidden" makeWrapper "$hidden" "$prog" \ - --argv0 "" \ + --inherit-argv0 \ --set WINELOADER "$hidden" \ --prefix GST_PLUGIN_SYSTEM_PATH_1_0 ":" "$GST_PLUGIN_SYSTEM_PATH_1_0" fi