Wine installing mingw32 compiler?

Hello,

I’m generating ISO images with preinstalled GNOME, nvidia and steam to play on a computer (more detail in this blog article), but the resulting nix store contains several packages like

  • i686-w64-mingw32-stage-final-gcc-debug-10.3.0
  • i686-w64-mingw32-stage-static-gcc-debug-10.3.0

They are huge and I don’t think I need them in my livecd. They are also present in my NixOS installation as well,

Having these packages takes more time to generate the ISO, creates a bigger ISO which takes more time to write on the USB disk, and uses more memory to fully load the ISO in RAM when booted.

Edit 1:
Using nix-store -q --tree /nix/var/nix/profiles/system it seems these packages are installed as a requirement for wine-wow, so I don’t think anything can be done, but I’m curious of it’s really useful for wine runtime.

Edit 2:
In wine definition https://github.com/NixOS/nixpkgs/blob/41c91c48eee8801b91eb6c18ef763b11dc059047/pkgs/applications/emulators/wine/base.nix#L64 mingw compiler is in nativeBuildInputs, I don’t understand why it gets installed with wine.

Discussed here:
https://github.com/NixOS/nixpkgs/issues/103102#issuecomment-725012817
and here:
https://github.com/NixOS/nixpkgs/pull/113146

Depending on the Software you want to run under Wine, you can use sth. like

  (wineWowPackages.unstable.override {
        mingwSupport = false;
      })
1 Like

Thank you very much, I searched in the code but forgot to look at the PRs.

In my case I’d like lutris package to use wine without mingwSupport, I tried this but it fails with an error, I can’t figure out the syntax, despite some information in this old thread.

  environment.systemPackages = with pkgs; [
    (lutris.override {
        wine = (wineWowPackages.unstable.override {
            mingwSupport = false;
        });
    })
 ];

and when building I have the following error which is not very helpful

error: anonymous function at /nix/store/fj7xz1cv9c8nrvdyd6bxhwq3l55k47xc-source/pkgs/applications/misc/lutris/fhsenv.nix:1:1 called with unexpected argument 'wine'

       at /nix/store/fj7xz1cv9c8nrvdyd6bxhwq3l55k47xc-source/lib/customisation.nix:69:16:

           68|     let
           69|       result = f origArgs;
             |                ^
           70|

Currently compiling lutris with modified wine using this :crossed_fingers:t3:

    (lutris-free.override {
        lutris-unwrapped = lutris-unwrapped.override {
            wine = wineWowPackages.staging.override {
                mingwSupport = false;
            };
        };
    })
1 Like
  • i686-w64-mingw32-stage-final-gcc-debug-10.3.0
  • i686-w64-mingw32-stage-static-gcc-debug-10.3.0
nix-store --query --referrers /nix/store/whatever-thing-you-don't-know-the-origin-of

This will tell you why they are being pulled in.

I don’t really understand what --referrers gives, but nix-store --query --referrers-closure gives exactly what I want.