1## Configuration:
2# Control you default wine config in nixpkgs-config:
3# wine = {
4# release = "stable"; # "stable", "unstable", "staging", "wayland"
5# build = "wineWow"; # "wine32", "wine64", "wineWow"
6# };
7# Make additional configurations on demand:
8# wine.override { wineBuild = "wine32"; wineRelease = "staging"; };
9{
10 lib,
11 stdenv,
12 callPackage,
13 darwin,
14 wineRelease ? "stable",
15 wineBuild ? if stdenv.hostPlatform.system == "x86_64-linux" then "wineWow" else "wine32",
16 gettextSupport ? false,
17 fontconfigSupport ? false,
18 alsaSupport ? false,
19 gtkSupport ? false,
20 openglSupport ? false,
21 tlsSupport ? false,
22 gstreamerSupport ? false,
23 cupsSupport ? false,
24 dbusSupport ? false,
25 openclSupport ? false,
26 cairoSupport ? false,
27 odbcSupport ? false,
28 netapiSupport ? false,
29 cursesSupport ? false,
30 vaSupport ? false,
31 pcapSupport ? false,
32 v4lSupport ? false,
33 saneSupport ? false,
34 gphoto2Support ? false,
35 krb5Support ? false,
36 pulseaudioSupport ? false,
37 udevSupport ? false,
38 xineramaSupport ? false,
39 vulkanSupport ? false,
40 sdlSupport ? false,
41 usbSupport ? false,
42 mingwSupport ? stdenv.hostPlatform.isDarwin,
43 waylandSupport ? false,
44 x11Support ? false,
45 embedInstallers ? false, # The Mono and Gecko MSI installers
46 moltenvk, # Allow users to override MoltenVK easily
47}:
48
49let
50 wine-build =
51 build: release:
52 lib.getAttr build (
53 callPackage ./packages.nix {
54 wineRelease = release;
55 supportFlags = {
56 inherit
57 alsaSupport
58 cairoSupport
59 cupsSupport
60 cursesSupport
61 dbusSupport
62 embedInstallers
63 fontconfigSupport
64 gettextSupport
65 gphoto2Support
66 gstreamerSupport
67 gtkSupport
68 krb5Support
69 mingwSupport
70 netapiSupport
71 odbcSupport
72 openclSupport
73 openglSupport
74 pcapSupport
75 pulseaudioSupport
76 saneSupport
77 sdlSupport
78 tlsSupport
79 udevSupport
80 usbSupport
81 v4lSupport
82 vaSupport
83 vulkanSupport
84 waylandSupport
85 x11Support
86 xineramaSupport
87 ;
88 };
89 inherit moltenvk;
90 }
91 );
92
93 baseRelease =
94 {
95 staging = "unstable";
96 yabridge = "yabridge";
97 }
98 .${wineRelease} or null;
99in
100if baseRelease != null then
101 callPackage ./staging.nix {
102 wineUnstable = (wine-build wineBuild baseRelease).override {
103 inherit wineRelease;
104 };
105 }
106else
107 wine-build wineBuild wineRelease