diff options
author | Martino Fontana <tinozzo123@gmail.com> | 2024-02-05 23:21:29 +0100 |
---|---|---|
committer | Martino Fontana <tinozzo123@gmail.com> | 2024-02-11 14:39:31 +0100 |
commit | b2182b9130c18c8d8527b86e2e8a2cb749c115fa (patch) | |
tree | cc35cb2d1e1a62e9bce7b34c38b9e70c6090928f /pkgs/applications/emulators/wine | |
parent | 2e2211a386070c0b5b3cbb94fb7da83637cd12dd (diff) | |
download | nixlib-b2182b9130c18c8d8527b86e2e8a2cb749c115fa.tar nixlib-b2182b9130c18c8d8527b86e2e8a2cb749c115fa.tar.gz nixlib-b2182b9130c18c8d8527b86e2e8a2cb749c115fa.tar.bz2 nixlib-b2182b9130c18c8d8527b86e2e8a2cb749c115fa.tar.lz nixlib-b2182b9130c18c8d8527b86e2e8a2cb749c115fa.tar.xz nixlib-b2182b9130c18c8d8527b86e2e8a2cb749c115fa.tar.zst nixlib-b2182b9130c18c8d8527b86e2e8a2cb749c115fa.zip |
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
Diffstat (limited to 'pkgs/applications/emulators/wine')
-rw-r--r-- | pkgs/applications/emulators/wine/base.nix | 8 | ||||
-rw-r--r-- | pkgs/applications/emulators/wine/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/emulators/wine/staging.nix | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/applications/emulators/wine/base.nix b/pkgs/applications/emulators/wine/base.nix index 08bf9a630682..fc6d08556091 100644 --- a/pkgs/applications/emulators/wine/base.nix +++ b/pkgs/applications/emulators/wine/base.nix @@ -23,6 +23,8 @@ let mingwGccsSuffixSalts = map (gcc: gcc.suffixSalt) mingwGccs; }; } ./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 stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { builder = buildScript; @@ -47,7 +49,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { }) // rec { 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 strictDeps = true; @@ -209,8 +211,8 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { binaryNativeCode # mono, gecko ]; 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"; - platforms = if supportFlags.waylandSupport then (lib.remove "x86_64-darwin" prevPlatforms) else prevPlatforms; + description = "An Open Source implementation of the Windows API on top of X, OpenGL, and Unix"; + platforms = if darwinUnsupported then (lib.remove "x86_64-darwin" prevPlatforms) else prevPlatforms; maintainers = with lib.maintainers; [ avnik raskin bendlas jmc-figueira reckenrode ]; inherit mainProgram; }; diff --git a/pkgs/applications/emulators/wine/default.nix b/pkgs/applications/emulators/wine/default.nix index 7e3514fa720a..69706dcfd720 100644 --- a/pkgs/applications/emulators/wine/default.nix +++ b/pkgs/applications/emulators/wine/default.nix @@ -36,8 +36,8 @@ sdlSupport ? false, usbSupport ? false, mingwSupport ? false, - waylandSupport ? stdenv.isLinux, - x11Support ? stdenv.isLinux, + waylandSupport ? false, + x11Support ? false, embedInstallers ? false, # The Mono and Gecko MSI installers moltenvk ? darwin.moltenvk # Allow users to override MoltenVK easily }: diff --git a/pkgs/applications/emulators/wine/staging.nix b/pkgs/applications/emulators/wine/staging.nix index 9e9a03ebfc59..0a99e6d42a87 100644 --- a/pkgs/applications/emulators/wine/staging.nix +++ b/pkgs/applications/emulators/wine/staging.nix @@ -7,12 +7,10 @@ let patch = (callPackage ./sources.nix {}).staging; (mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra; 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; nativeBuildInputs = [ autoconf hexdump perl python3 ] ++ self.nativeBuildInputs; - name = "${self.name}-staging"; - prePatch = self.prePatch or "" + '' patchShebangs tools cp -r ${patch}/patches ${patch}/staging . |