From 51e69b6cafaea692e3b788269a8bb262d1537a5b Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 27 Jun 2023 09:51:22 +0300 Subject: [PATCH] wine: allow building with experimental wow64 mode Allows running 32-bit applications on 64-bit native Wine, with no 32-bit libs on the system. Works at least well enough to run pkgsCross.mingw32.hello. --- pkgs/applications/emulators/wine/packages.nix | 11 +++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/applications/emulators/wine/packages.nix b/pkgs/applications/emulators/wine/packages.nix index dcdb75626de1..21e0db3e7b60 100644 --- a/pkgs/applications/emulators/wine/packages.nix +++ b/pkgs/applications/emulators/wine/packages.nix @@ -42,4 +42,15 @@ in with src; { platforms = [ "x86_64-linux" ]; mainProgram = "wine64"; }; + wineWow64 = callPackage ./base.nix { + pname = "wine-wow64"; + inherit src version supportFlags patches moltenvk; + pkgArches = [ pkgs ]; + mingwGccs = with pkgsCross; [ mingw32.buildPackages.gcc mingwW64.buildPackages.gcc ]; + geckos = [ gecko64 ]; + monos = [ mono ]; + configureFlags = [ "--enable-archs=x86_64,i386" ]; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; + mainProgram = "wine"; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b85950f1e450..77e2cb8d97c3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40414,6 +40414,7 @@ with pkgs; winePackages = recurseIntoAttrs (winePackagesFor (config.wine.build or "wine32")); wine64Packages = recurseIntoAttrs (winePackagesFor "wine64"); wineWowPackages = recurseIntoAttrs (winePackagesFor "wineWow"); + wineWow64Packages = recurseIntoAttrs (winePackagesFor "wineWow64"); wine = winePackages.full; wine64 = wine64Packages.full;