From a4e653d56fe23f19879804a9daea7a21bf48886c Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Fri, 16 Jan 2026 23:22:49 +0000 Subject: [PATCH] wine: accept device paths when loading DLLs Fixes error: addLibrarySearchPath: \\?\Z:\nix\store\... (Win32 error 87): Invalid parameter. --- pkgs/applications/emulators/wine/sources.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/emulators/wine/sources.nix b/pkgs/applications/emulators/wine/sources.nix index 698b386300db..c395bc91b81e 100644 --- a/pkgs/applications/emulators/wine/sources.nix +++ b/pkgs/applications/emulators/wine/sources.nix @@ -92,6 +92,14 @@ let }) ]; + patches-add-dll-accept-device-paths-wine-older-than-11_1 = [ + (pkgs.fetchpatch { + name = "add-dll-accept-device-paths"; + url = "https://gitlab.winehq.org/wine/wine/-/commit/401910ae25a11032f2da7baa1666d71e8bca2496.patch"; + hash = "sha256-2726u9/vhhx39Tq7vOw24hslmeyZZEbxRRqe7JMFvCU"; + }) + ]; + inherit (pkgs) writeShellScript; in rec { @@ -123,7 +131,8 @@ rec { patches = [ # Also look for root certificates at $NIX_SSL_CERT_FILE ./cert-path.patch - ]; + ] + ++ patches-add-dll-accept-device-paths-wine-older-than-11_1; updateScript = writeShellScript "update-wine-stable" '' ${updateScriptPreamble}