From 88e1287a99501087d17e041c65a996f5f93d00c0 Mon Sep 17 00:00:00 2001 From: hideyosh1 Date: Mon, 26 Jan 2026 15:30:53 -0600 Subject: [PATCH 1/3] winetricks: 20250102 -> 20260125 --- pkgs/applications/emulators/wine/sources.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/emulators/wine/sources.nix b/pkgs/applications/emulators/wine/sources.nix index fdb6fffad5be..223fdba8014c 100644 --- a/pkgs/applications/emulators/wine/sources.nix +++ b/pkgs/applications/emulators/wine/sources.nix @@ -254,8 +254,8 @@ rec { winetricks = fetchFromGitHub rec { # https://github.com/Winetricks/winetricks/releases - version = "20250102"; - hash = "sha256-Km2vVTYsLs091cjmNTW8Kqku3vdsEA0imTtZfqZWDQo="; + version = "20260125"; + hash = "sha256-uIBVESebsH7rXnxWd/qlrZxcG7Y486PctHzcLz29HDk="; owner = "Winetricks"; repo = "winetricks"; rev = version; From a2b61e7e03c185be48823c2844b64b5116357f03 Mon Sep 17 00:00:00 2001 From: hideyosh1 Date: Mon, 26 Jan 2026 17:11:50 -0600 Subject: [PATCH 2/3] winetricks: add unrar-free dependency winetricks: add unrar-free dependency --- .../emulators/wine/winetricks.nix | 60 ++++++++++++++----- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/pkgs/applications/emulators/wine/winetricks.nix b/pkgs/applications/emulators/wine/winetricks.nix index 76e9ee4b621f..609aadfb0fc5 100644 --- a/pkgs/applications/emulators/wine/winetricks.nix +++ b/pkgs/applications/emulators/wine/winetricks.nix @@ -2,20 +2,23 @@ lib, stdenv, callPackage, - perl, - which, - coreutils, - zenity, - curl, - cabextract, - unzip, - p7zip, - gnused, - gnugrep, + makeWrapper, bash, + cabextract, + coreutils, + curl, gawk, + gnugrep, + gnused, gnutar, + unrar-free, gzip, + p7zip, + perl, + unzip, + which, + zenity, + versionCheckHook, }: stdenv.mkDerivation rec { @@ -27,6 +30,7 @@ stdenv.mkDerivation rec { buildInputs = [ perl which + makeWrapper ]; # coreutils is for sha1sum @@ -45,18 +49,46 @@ stdenv.mkDerivation rec { gawk gnutar gzip + unrar-free ]; makeFlags = [ "PREFIX=$(out)" ]; doCheck = false; # requires "bashate" - postInstall = '' - sed -i \ - -e '2i PATH="${pathAdd}:$PATH"' \ - "$out/bin/winetricks" + postPatch = '' + patchShebangs src/winetricks + substituteInPlace src/winetricks \ + --replace-fail 'command -v unrar' 'command -v unrar-free' \ + --replace-fail 'w_try unrar' 'w_try unrar-free' ''; + postInstall = + let + runtimeDependencies = [ + bash + cabextract + coreutils + curl + gawk + gnugrep + gnused + gnutar + gzip + p7zip + perl + unrar-free + unzip + which + zenity + ]; + in + '' + wrapProgram $out/bin/winetricks \ + --prefix PATH : "${lib.makeBinPath runtimeDependencies}" \ + --set WINETRICKS_LATEST_VERSION_CHECK "disabled" + ''; + passthru = { inherit (src) updateScript; }; From cfcd72b91e43d6012cafa6d161a8bb3a75030dd7 Mon Sep 17 00:00:00 2001 From: hideyosh1 Date: Sun, 1 Feb 2026 13:12:42 -0600 Subject: [PATCH 3/3] winetricks: add versionCheckHook also add postInstall to replace PATH hacks --- .../emulators/wine/winetricks.nix | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/pkgs/applications/emulators/wine/winetricks.nix b/pkgs/applications/emulators/wine/winetricks.nix index 609aadfb0fc5..76a3eef7a497 100644 --- a/pkgs/applications/emulators/wine/winetricks.nix +++ b/pkgs/applications/emulators/wine/winetricks.nix @@ -11,13 +11,13 @@ gnugrep, gnused, gnutar, - unrar-free, gzip, p7zip, perl, unzip, which, zenity, + unrar-free, versionCheckHook, }: @@ -33,29 +33,13 @@ stdenv.mkDerivation rec { makeWrapper ]; - # coreutils is for sha1sum - pathAdd = lib.makeBinPath [ - perl - which - coreutils - zenity - curl - cabextract - unzip - p7zip - gnused - gnugrep - bash - gawk - gnutar - gzip - unrar-free - ]; - makeFlags = [ "PREFIX=$(out)" ]; doCheck = false; # requires "bashate" + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + postPatch = '' patchShebangs src/winetricks substituteInPlace src/winetricks \