forked from mirrors/nixpkgs
wine: cleanup Wayland
Makes base.nix less Wayland-centric. This means: - Don't specify support in the meta.description (since even regular Wine supports it, it's specified everywhere) - `x11Support` and `waylandSupport` are now set in `wine-packages.nix`, like every other flag (they are also now disabled on minimal) - Disable Darwin in supported platforms if an incompatible supportFlag is true (not just `waylandSupport`) - Add wineRelease name for every release other than "stable" or "unstable", instead of just "wayland" - This also fixes an inconsistency on wine-staging, where "-staging" was written after the version
This commit is contained in:
parent
2e2211a386
commit
b2182b9130
|
@ -23,6 +23,8 @@ let
|
||||||
mingwGccsSuffixSalts = map (gcc: gcc.suffixSalt) mingwGccs;
|
mingwGccsSuffixSalts = map (gcc: gcc.suffixSalt) mingwGccs;
|
||||||
};
|
};
|
||||||
} ./setup-hook-darwin.sh;
|
} ./setup-hook-darwin.sh;
|
||||||
|
darwinUnsupportedFlags = [ "alsaSupport" "cairoSupport" "dbusSupport" "fontconfigSupport" "gtkSupport" "netapiSupport" "pulseaudioSupport" "udevSupport" "v4lSupport" "vaSupport" "waylandSupport" "x11Support" "xineramaSupport" ];
|
||||||
|
darwinUnsupported = builtins.any (name: builtins.getAttr name supportFlags) darwinUnsupportedFlags;
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
|
stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
|
||||||
builder = buildScript;
|
builder = buildScript;
|
||||||
|
@ -47,7 +49,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
|
||||||
}) // rec {
|
}) // rec {
|
||||||
inherit version src;
|
inherit version src;
|
||||||
|
|
||||||
pname = prevName + lib.optionalString (wineRelease == "wayland") "-wayland";
|
pname = prevName + lib.optionalString (wineRelease != "stable" && wineRelease != "unstable") "-${wineRelease}";
|
||||||
|
|
||||||
# Fixes "Compiler cannot create executables" building wineWow with mingwSupport
|
# Fixes "Compiler cannot create executables" building wineWow with mingwSupport
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
@ -209,8 +211,8 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
|
||||||
binaryNativeCode # mono, gecko
|
binaryNativeCode # mono, gecko
|
||||||
];
|
];
|
||||||
broken = stdenv.isDarwin && !supportFlags.mingwSupport;
|
broken = stdenv.isDarwin && !supportFlags.mingwSupport;
|
||||||
description = if supportFlags.waylandSupport then "An Open Source implementation of the Windows API on top of OpenGL and Unix (with experimental Wayland support)" else "An Open Source implementation of the Windows API on top of X, OpenGL, and Unix";
|
description = "An Open Source implementation of the Windows API on top of X, OpenGL, and Unix";
|
||||||
platforms = if supportFlags.waylandSupport then (lib.remove "x86_64-darwin" prevPlatforms) else prevPlatforms;
|
platforms = if darwinUnsupported then (lib.remove "x86_64-darwin" prevPlatforms) else prevPlatforms;
|
||||||
maintainers = with lib.maintainers; [ avnik raskin bendlas jmc-figueira reckenrode ];
|
maintainers = with lib.maintainers; [ avnik raskin bendlas jmc-figueira reckenrode ];
|
||||||
inherit mainProgram;
|
inherit mainProgram;
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,8 +36,8 @@
|
||||||
sdlSupport ? false,
|
sdlSupport ? false,
|
||||||
usbSupport ? false,
|
usbSupport ? false,
|
||||||
mingwSupport ? false,
|
mingwSupport ? false,
|
||||||
waylandSupport ? stdenv.isLinux,
|
waylandSupport ? false,
|
||||||
x11Support ? stdenv.isLinux,
|
x11Support ? false,
|
||||||
embedInstallers ? false, # The Mono and Gecko MSI installers
|
embedInstallers ? false, # The Mono and Gecko MSI installers
|
||||||
moltenvk ? darwin.moltenvk # Allow users to override MoltenVK easily
|
moltenvk ? darwin.moltenvk # Allow users to override MoltenVK easily
|
||||||
}:
|
}:
|
||||||
|
|
|
@ -7,12 +7,10 @@ let patch = (callPackage ./sources.nix {}).staging;
|
||||||
(mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra;
|
(mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra;
|
||||||
in assert lib.versions.majorMinor wineUnstable.version == lib.versions.majorMinor patch.version;
|
in assert lib.versions.majorMinor wineUnstable.version == lib.versions.majorMinor patch.version;
|
||||||
|
|
||||||
(lib.overrideDerivation wineUnstable (self: {
|
(lib.overrideDerivation (wineUnstable.override { wineRelease = "staging"; }) (self: {
|
||||||
buildInputs = build-inputs [ "perl" "util-linux" "autoconf" "gitMinimal" ] self.buildInputs;
|
buildInputs = build-inputs [ "perl" "util-linux" "autoconf" "gitMinimal" ] self.buildInputs;
|
||||||
nativeBuildInputs = [ autoconf hexdump perl python3 ] ++ self.nativeBuildInputs;
|
nativeBuildInputs = [ autoconf hexdump perl python3 ] ++ self.nativeBuildInputs;
|
||||||
|
|
||||||
name = "${self.name}-staging";
|
|
||||||
|
|
||||||
prePatch = self.prePatch or "" + ''
|
prePatch = self.prePatch or "" + ''
|
||||||
patchShebangs tools
|
patchShebangs tools
|
||||||
cp -r ${patch}/patches ${patch}/staging .
|
cp -r ${patch}/patches ${patch}/staging .
|
||||||
|
|
|
@ -25,6 +25,8 @@ rec {
|
||||||
sdlSupport = true;
|
sdlSupport = true;
|
||||||
mingwSupport = true;
|
mingwSupport = true;
|
||||||
usbSupport = true;
|
usbSupport = true;
|
||||||
|
waylandSupport = stdenv.isLinux;
|
||||||
|
x11Support = stdenv.isLinux;
|
||||||
};
|
};
|
||||||
|
|
||||||
full = base.override {
|
full = base.override {
|
||||||
|
@ -50,6 +52,6 @@ rec {
|
||||||
staging = base.override { wineRelease = "staging"; };
|
staging = base.override { wineRelease = "staging"; };
|
||||||
stagingFull = full.override { wineRelease = "staging"; };
|
stagingFull = full.override { wineRelease = "staging"; };
|
||||||
|
|
||||||
wayland = base.override { wineRelease = "wayland"; };
|
wayland = base.override { wineRelease = "wayland"; waylandSupport = true; };
|
||||||
waylandFull = full.override { wineRelease = "wayland"; };
|
waylandFull = full.override { wineRelease = "wayland"; waylandSupport = true; };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue