Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winePackages: enable mingwSupport in base build #113146

Merged
merged 1 commit into from
Feb 18, 2021
Merged

Conversation

kira-bruneau
Copy link
Contributor

@kira-bruneau kira-bruneau commented Feb 14, 2021

Motivation for this change

Closes #103102

With mingwSupport enabled, Wine uses MinGW builds of GCC (compiled for the i686-w64-mingw32 & x86_64-w64-mingw32 targets) to cross compile system DLLs as PE executables.

This is used to workaround some basic anticheat software.

Fedora & Arch Linux also have this enabled by default in their Wine builds:

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@avnik @bendlas @7c6f434c @Atemu @veprbl

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 11-100 labels Feb 14, 2021
@kira-bruneau
Copy link
Contributor Author

Result of nixpkgs-review pr 113146 run on x86_64-linux 1

1 package failed to build:
  • airwave
15 packages built:
  • lutris
  • lutris-free
  • lutris-unwrapped
  • pipelight
  • playonlinux
  • wine (wineFull)
  • wineStaging (wine-staging)
  • wineStable (winePackages.base)
  • winePackages.staging
  • wineUnstable (winePackages.unstable)
  • wineWowPackages.base (wineWowPackages.stable)
  • wineWowPackages.full
  • wineWowPackages.staging
  • wineWowPackages.unstable
  • winetricks

@kira-bruneau
Copy link
Contributor Author

airwave requires a binary blob:

builder for '/nix/store/n2cghv7hmd36w1ng4ffjkqis8wsk0pff-vstsdk368_08_11_2017_build_121.zip.drv' failed with exit code 1; last 10 log lines:
  ***
  Unfortunately, we cannot download file vstsdk368_08_11_2017_build_121.zip automatically.
  Please go to http://www.steinberg.net/en/company/developers.html to download it yourself, and add it to the Nix store
  using either
    nix-store --add-fixed sha256 vstsdk368_08_11_2017_build_121.zip
  or
    nix-prefetch-url --type sha256 file:///path/to/vstsdk368_08_11_2017_build_121.zip

  ***
cannot build derivation '/nix/store/cy8dbjarr2i3vlsjvxfwpqzbds5vg1s5-vstsdk368_08_11_2017_build_121.drv': 1 dependencies couldn't be built

@kira-bruneau
Copy link
Contributor Author

Will run nixpkgs-review again now that #113140 (comment) was merged.

@kira-bruneau
Copy link
Contributor Author

Result of nixpkgs-review pr 113146 run on x86_64-linux 1

15 packages built:
  • lutris
  • lutris-free
  • lutris-unwrapped
  • pipelight
  • playonlinux
  • wine (winePackages.full)
  • wine-staging
  • winePackages.base (winePackages.stable)
  • winePackages.staging
  • winePackages.unstable
  • wineWowPackages.base (wineWowPackages.stable)
  • wineWowPackages.full
  • wineWowPackages.staging
  • wineWowPackages.unstable
  • winetricks

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Feb 15, 2021

I guess this is needed to compile wine DLLs in the windows PE format, probably to appeal anti-cheat malsoftware?
Can you put the reason for this change in the commit message?

Interestingly, the closure size is actually decreasing with this change. Is this the result of stripping?

@kira-bruneau
Copy link
Contributor Author

kira-bruneau commented Feb 15, 2021

I guess this is needed to compile wine DLLs in the windows PE format, probably to appeal anti-cheat malsoftware?
Can you put the reason for this change in the commit message?

Yep, I'll add it to the commit message.

Interestingly, the closure size is actually decreasing with this change. Is this the result of stripping?

Both ELFs & PEs are being stripped now and that should cause a decrease overall, even without this option. It just seems like wine is producing smaller binaries when generating PEs (without debug info), but it takes longer to compile. There is no difference in closure dependencies.

With mingwSupport enabled, Wine uses MinGW builds of GCC (compiled for
the i686-w64-mingw32 & x86_64-w64-mingw32 targets) to cross compile
system DLLs as PE executables.

This is used to workaround some basic anticheat software. (See NixOS#103102)

Fedora & Arch Linux also have this enabled by default in their Wine builds:
- Fedora: https://src.fedoraproject.org/rpms/wine/blob/8e216ca407b6c0f78f65f36c5b068c6452701e55/f/wine.spec#_116
- Arch Linux: https://github.com/archlinux/svntogit-community/blob/2435e762eacd989c588200d7cf57d8f4fb2e0cf3/trunk/PKGBUILD#L44
Copy link
Contributor

@rnhmjoj rnhmjoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've built and tested winePackages.full and wineWowPackages.full with a couple programs and found no issue. Looks good to me.

@rnhmjoj rnhmjoj merged commit 0b87306 into NixOS:master Feb 18, 2021
@kira-bruneau kira-bruneau mentioned this pull request Mar 21, 2021
10 tasks
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/wine-installing-mingw32-compiler/19944/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wine (with mingw support)
3 participants