aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/default.nix
blob: 24f827b25ffe7f5dac53f58471e1c7200bcc33f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
## Configuration:
# Control you default wine config in nixpkgs-config:
# wine = {
#   release = "stable"; # "stable", "unstable", "staging"
#   build = "wineWow"; # "wine32", "wine64", "wineWow"
# };
# Make additional configurations on demand:
# wine.override { wineBuild = "wine32"; wineRelease = "staging"; };
{ lib, stdenv, callPackage,
  wineRelease ? "stable",
  wineBuild ? if stdenv.hostPlatform.system == "x86_64-linux" then "wineWow" else "wine32",
  pngSupport ? false,
  jpegSupport ? false,
  tiffSupport ? false,
  gettextSupport ? false,
  fontconfigSupport ? false,
  alsaSupport ? false,
  gtkSupport ? false,
  openglSupport ? false,
  tlsSupport ? false,
  gstreamerSupport ? false,
  cupsSupport ? false,
  colorManagementSupport ? false,
  dbusSupport ? false,
  mpg123Support ? false,
  openalSupport ? false,
  openclSupport ? false,
  cairoSupport ? false,
  odbcSupport ? false,
  netapiSupport ? false,
  cursesSupport ? false,
  vaSupport ? false,
  pcapSupport ? false,
  v4lSupport ? false,
  saneSupport ? false,
  gsmSupport ? false,
  gphoto2Support ? false,
  ldapSupport ? false,
  pulseaudioSupport ? false,
  udevSupport ? false,
  xineramaSupport ? false,
  xmlSupport ? false,
  vulkanSupport ? false,
  sdlSupport ? false,
  faudioSupport ? false,
  vkd3dSupport ? false,
  mingwSupport ? false,
}:

let wine-build = build: release:
      lib.getAttr build (callPackage ./packages.nix {
        wineRelease = release;
        supportFlags = {
          inherit pngSupport jpegSupport cupsSupport colorManagementSupport gettextSupport
                  dbusSupport mpg123Support openalSupport cairoSupport tiffSupport odbcSupport
                  netapiSupport cursesSupport vaSupport pcapSupport v4lSupport saneSupport
                  gsmSupport gphoto2Support ldapSupport fontconfigSupport alsaSupport
                  pulseaudioSupport xineramaSupport gtkSupport openclSupport xmlSupport tlsSupport
                  openglSupport gstreamerSupport udevSupport vulkanSupport sdlSupport faudioSupport
                  vkd3dSupport mingwSupport;
        };
      });

in if wineRelease == "staging" then
  callPackage ./staging.nix {
    wineUnstable = wine-build wineBuild "unstable";
  }
else
  wine-build wineBuild wineRelease