about summary refs log tree commit diff
diff options
context:
space:
mode:
author7c6f434c <7c6f434c@mail.ru>2024-02-12 05:02:35 +0000
committerGitHub <noreply@github.com>2024-02-12 05:02:35 +0000
commitb54cebbc14d59a8768a878ccd0e0f0deaff099da (patch)
tree0dbb2eaa84b9ca6b6846fe293880b7ecdac6f6f7
parent01737456dfe4907fb5bdc8af39ac8c6d6b1fb551 (diff)
parentb2182b9130c18c8d8527b86e2e8a2cb749c115fa (diff)
downloadnixlib-b54cebbc14d59a8768a878ccd0e0f0deaff099da.tar
nixlib-b54cebbc14d59a8768a878ccd0e0f0deaff099da.tar.gz
nixlib-b54cebbc14d59a8768a878ccd0e0f0deaff099da.tar.bz2
nixlib-b54cebbc14d59a8768a878ccd0e0f0deaff099da.tar.lz
nixlib-b54cebbc14d59a8768a878ccd0e0f0deaff099da.tar.xz
nixlib-b54cebbc14d59a8768a878ccd0e0f0deaff099da.tar.zst
nixlib-b54cebbc14d59a8768a878ccd0e0f0deaff099da.zip
Merge pull request #286580 from SuperSamus/wine-update
winePackages{unstable,staging}: 9.0 -> 9.2, cleanup
-rw-r--r--pkgs/applications/emulators/wine/base.nix8
-rw-r--r--pkgs/applications/emulators/wine/default.nix6
-rw-r--r--pkgs/applications/emulators/wine/sources.nix19
-rw-r--r--pkgs/applications/emulators/wine/staging.nix4
-rw-r--r--pkgs/top-level/wine-packages.nix6
5 files changed, 23 insertions, 20 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 ec05cef74414..69706dcfd720 100644
--- a/pkgs/applications/emulators/wine/default.nix
+++ b/pkgs/applications/emulators/wine/default.nix
@@ -35,9 +35,9 @@
   vulkanSupport ? false,
   sdlSupport ? false,
   usbSupport ? false,
-  mingwSupport ? wineRelease != "stable",
-  waylandSupport ? stdenv.isLinux,
-  x11Support ? stdenv.isLinux,
+  mingwSupport ? false,
+  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/sources.nix b/pkgs/applications/emulators/wine/sources.nix
index 8bae07a87e07..a0195eadd090 100644
--- a/pkgs/applications/emulators/wine/sources.nix
+++ b/pkgs/applications/emulators/wine/sources.nix
@@ -69,9 +69,9 @@ in rec {
 
   unstable = fetchurl rec {
     # NOTE: Don't forget to change the hash for staging as well.
-    version = "9.0";
-    url = "https://dl.winehq.org/wine/source/9.0/wine-${version}.tar.xz";
-    hash = "sha256-fP0JClOV9bdtlbtd76yKMSyN5MBwwRY7i1jaODMMpu4=";
+    version = "9.2";
+    url = "https://dl.winehq.org/wine/source/9.x/wine-${version}.tar.xz";
+    hash = "sha256-goHFoILMR6w8LJHOqt5fFzllU7Oa3LMudBJThltlgWI=";
     inherit (stable) patches;
 
     ## see http://wiki.winehq.org/Gecko
@@ -88,9 +88,9 @@ in rec {
 
     ## see http://wiki.winehq.org/Mono
     mono = fetchurl rec {
-      version = "8.1.0";
+      version = "9.0.0";
       url = "https://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}-x86.msi";
-      hash = "sha256-DtPsUzrvebLzEhVZMc97EIAAmsDFtMK8/rZ4rJSOCBA=";
+      hash = "sha256-efbEMQBnVWbBEvQZm56nuUTTOBZLNL2R+hGwsKQU4cQ=";
     };
 
     updateScript = writeShellScript "update-wine-unstable" ''
@@ -114,11 +114,12 @@ in rec {
     '';
   };
 
-  staging = fetchFromGitHub rec {
-    # https://github.com/wine-staging/wine-staging/releases
+  staging = fetchFromGitLab rec {
+    # https://gitlab.winehq.org/wine/wine-staging
     inherit (unstable) version;
-    hash = "sha256-lE/95OZigifreaRRCPkvA+Z0FqsBmm018jD6leSysXU=";
-    owner = "wine-staging";
+    hash = "sha256-VQ4j4PuXRoXbCUZ16snVO+jRvuKD4Rjn14R7bhwdAco=";
+    domain = "gitlab.winehq.org";
+    owner = "wine";
     repo = "wine-staging";
     rev = "v${version}";
 
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 .
diff --git a/pkgs/top-level/wine-packages.nix b/pkgs/top-level/wine-packages.nix
index 7cf5533da7f2..18596f21014e 100644
--- a/pkgs/top-level/wine-packages.nix
+++ b/pkgs/top-level/wine-packages.nix
@@ -25,6 +25,8 @@ rec {
     sdlSupport = true;
     mingwSupport = true;
     usbSupport = true;
+    waylandSupport = stdenv.isLinux;
+    x11Support = stdenv.isLinux;
   };
 
   full = base.override {
@@ -50,6 +52,6 @@ rec {
   staging = base.override { wineRelease = "staging"; };
   stagingFull = full.override { wineRelease = "staging"; };
 
-  wayland = base.override { wineRelease = "wayland"; };
-  waylandFull = full.override { wineRelease = "wayland"; };
+  wayland = base.override { wineRelease = "wayland"; waylandSupport = true; };
+  waylandFull = full.override { wineRelease = "wayland"; waylandSupport = true; };
 }