mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
58 lines
1.9 KiB
Nix
58 lines
1.9 KiB
Nix
{ stdenv, config, callPackage, wineBuild }:
|
|
|
|
rec {
|
|
fonts = callPackage ../applications/emulators/wine/fonts.nix {};
|
|
minimal = callPackage ../applications/emulators/wine {
|
|
wineRelease = config.wine.release or "stable";
|
|
inherit wineBuild;
|
|
};
|
|
|
|
base = minimal.override {
|
|
gettextSupport = true;
|
|
fontconfigSupport = stdenv.hostPlatform.isLinux;
|
|
alsaSupport = stdenv.hostPlatform.isLinux;
|
|
openglSupport = true;
|
|
vulkanSupport = true;
|
|
tlsSupport = true;
|
|
cupsSupport = true;
|
|
dbusSupport = stdenv.hostPlatform.isLinux;
|
|
cairoSupport = stdenv.hostPlatform.isLinux;
|
|
cursesSupport = true;
|
|
saneSupport = stdenv.hostPlatform.isLinux;
|
|
pulseaudioSupport = config.pulseaudio or stdenv.hostPlatform.isLinux;
|
|
udevSupport = stdenv.hostPlatform.isLinux;
|
|
xineramaSupport = stdenv.hostPlatform.isLinux;
|
|
sdlSupport = true;
|
|
mingwSupport = true;
|
|
usbSupport = true;
|
|
waylandSupport = stdenv.hostPlatform.isLinux;
|
|
x11Support = stdenv.hostPlatform.isLinux;
|
|
};
|
|
|
|
full = base.override {
|
|
gtkSupport = stdenv.hostPlatform.isLinux;
|
|
gstreamerSupport = true;
|
|
openclSupport = true;
|
|
odbcSupport = true;
|
|
netapiSupport = stdenv.hostPlatform.isLinux;
|
|
vaSupport = stdenv.hostPlatform.isLinux;
|
|
pcapSupport = true;
|
|
v4lSupport = stdenv.hostPlatform.isLinux;
|
|
gphoto2Support = true;
|
|
krb5Support = true;
|
|
embedInstallers = true;
|
|
};
|
|
|
|
stable = base.override { wineRelease = "stable"; };
|
|
stableFull = full.override { wineRelease = "stable"; };
|
|
|
|
unstable = base.override { wineRelease = "unstable"; };
|
|
unstableFull = full.override { wineRelease = "unstable"; };
|
|
|
|
staging = base.override { wineRelease = "staging"; };
|
|
stagingFull = full.override { wineRelease = "staging"; };
|
|
|
|
wayland = base.override { wineRelease = "wayland"; waylandSupport = true; };
|
|
waylandFull = full.override { wineRelease = "wayland"; waylandSupport = true; };
|
|
}
|