about summary refs log tree commit diff
path: root/pkgs/applications/emulators/wine
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/emulators/wine')
-rw-r--r--pkgs/applications/emulators/wine/base.nix22
-rw-r--r--pkgs/applications/emulators/wine/default.nix2
-rw-r--r--pkgs/applications/emulators/wine/sources.nix10
-rw-r--r--pkgs/applications/emulators/wine/staging.nix6
4 files changed, 20 insertions, 20 deletions
diff --git a/pkgs/applications/emulators/wine/base.nix b/pkgs/applications/emulators/wine/base.nix
index dfc72683d7d3b..cff069a2e75c9 100644
--- a/pkgs/applications/emulators/wine/base.nix
+++ b/pkgs/applications/emulators/wine/base.nix
@@ -23,7 +23,7 @@ let
     };
   } ./setup-hook-darwin.sh;
 
-  darwinFrameworks = lib.optionals stdenv.isDarwin (
+  darwinFrameworks = lib.optionals stdenv.hostPlatform.isDarwin (
     toBuildInputs pkgArches (pkgs: with pkgs.buildPackages.darwin.apple_sdk.frameworks; [
       CoreServices Foundation ForceFeedback AppKit OpenGL IOKit DiskArbitration PCSC Security
       ApplicationServices AudioToolbox CoreAudio AudioUnit CoreMIDI OpenCL Cocoa Carbon
@@ -40,7 +40,7 @@ let
 in
 stdenv.mkDerivation (finalAttrs:
 lib.optionalAttrs (buildScript != null) { builder = buildScript; }
-// lib.optionalAttrs stdenv.isDarwin {
+// lib.optionalAttrs stdenv.hostPlatform.isDarwin {
     postBuild = ''
       # The Wine preloader must _not_ be linked to any system libraries, but `NIX_LDFLAGS` will link
       # to libintl, libiconv, and CoreFoundation no matter what. Delete the one that was built and
@@ -68,12 +68,12 @@ lib.optionalAttrs (buildScript != null) { builder = buildScript; }
     pkg-config
   ]
   ++ lib.optionals supportFlags.mingwSupport (mingwGccs
-    ++ lib.optional stdenv.isDarwin setupHookDarwin);
+    ++ lib.optional stdenv.hostPlatform.isDarwin setupHookDarwin);
 
   buildInputs = toBuildInputs pkgArches (with supportFlags; (pkgs:
   [ pkgs.freetype pkgs.perl pkgs.libunwind ]
-  ++ lib.optional stdenv.isLinux         pkgs.libcap
-  ++ lib.optional stdenv.isDarwin        pkgs.libinotify-kqueue
+  ++ lib.optional stdenv.hostPlatform.isLinux         pkgs.libcap
+  ++ lib.optional stdenv.hostPlatform.isDarwin        pkgs.libinotify-kqueue
   ++ lib.optional cupsSupport            pkgs.cups
   ++ lib.optional gettextSupport         pkgs.gettext
   ++ lib.optional dbusSupport            pkgs.dbus
@@ -92,7 +92,7 @@ lib.optionalAttrs (buildScript != null) { builder = buildScript; }
   ++ lib.optional pulseaudioSupport      pkgs.libpulseaudio
   ++ lib.optional (xineramaSupport && x11Support) pkgs.xorg.libXinerama
   ++ lib.optional udevSupport            pkgs.udev
-  ++ lib.optional vulkanSupport          (if stdenv.isDarwin then moltenvk else pkgs.vulkan-loader)
+  ++ lib.optional vulkanSupport          (if stdenv.hostPlatform.isDarwin then moltenvk else pkgs.vulkan-loader)
   ++ lib.optional sdlSupport             pkgs.SDL2
   ++ lib.optional usbSupport             pkgs.libusb1
   ++ lib.optionals gstreamerSupport      (with pkgs.gst_all_1;
@@ -100,13 +100,13 @@ lib.optionalAttrs (buildScript != null) { builder = buildScript; }
   ++ lib.optionals gtkSupport    [ pkgs.gtk3 pkgs.glib ]
   ++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.ocl-icd ]
   ++ lib.optionals tlsSupport    [ pkgs.openssl pkgs.gnutls ]
-  ++ lib.optionals (openglSupport && !stdenv.isDarwin) [ pkgs.libGLU pkgs.libGL pkgs.mesa.osmesa pkgs.libdrm ]
-  ++ lib.optionals stdenv.isDarwin darwinFrameworks
+  ++ lib.optionals (openglSupport && !stdenv.hostPlatform.isDarwin) [ pkgs.libGLU pkgs.libGL pkgs.mesa.osmesa pkgs.libdrm ]
+  ++ lib.optionals stdenv.hostPlatform.isDarwin darwinFrameworks
   ++ lib.optionals (x11Support) (with pkgs.xorg; [
     libX11 libXcomposite libXcursor libXext libXfixes libXi libXrandr libXrender libXxf86vm
   ])
   ++ lib.optionals waylandSupport (with pkgs; [
-     wayland libxkbcommon wayland-protocols wayland.dev libxkbcommon.dev
+     wayland wayland-scanner libxkbcommon wayland-protocols wayland.dev libxkbcommon.dev
      mesa # for libgbm
   ])));
 
@@ -115,7 +115,7 @@ lib.optionalAttrs (buildScript != null) { builder = buildScript; }
   configureFlags = prevConfigFlags
     ++ lib.optionals supportFlags.waylandSupport [ "--with-wayland" ]
     ++ lib.optionals supportFlags.vulkanSupport [ "--with-vulkan" ]
-    ++ lib.optionals ((stdenv.isDarwin && !supportFlags.xineramaSupport) || !supportFlags.x11Support) [ "--without-x" ];
+    ++ lib.optionals ((stdenv.hostPlatform.isDarwin && !supportFlags.xineramaSupport) || !supportFlags.x11Support) [ "--without-x" ];
 
   # Wine locates a lot of libraries dynamically through dlopen().  Add
   # them to the RPATH so that the user doesn't have to set them in
@@ -176,7 +176,7 @@ lib.optionalAttrs (buildScript != null) { builder = buildScript; }
 
   # https://bugs.winehq.org/show_bug.cgi?id=43530
   # https://github.com/NixOS/nixpkgs/issues/31989
-  hardeningDisable = [ "bindnow" ]
+  hardeningDisable = [ "bindnow" "stackclashprotection" ]
     ++ lib.optional (stdenv.hostPlatform.isDarwin) "fortify"
     ++ lib.optional (supportFlags.mingwSupport) "format";
 
diff --git a/pkgs/applications/emulators/wine/default.nix b/pkgs/applications/emulators/wine/default.nix
index 69706dcfd7206..8c8ebdea5878c 100644
--- a/pkgs/applications/emulators/wine/default.nix
+++ b/pkgs/applications/emulators/wine/default.nix
@@ -35,7 +35,7 @@
   vulkanSupport ? false,
   sdlSupport ? false,
   usbSupport ? false,
-  mingwSupport ? false,
+  mingwSupport ? stdenv.hostPlatform.isDarwin,
   waylandSupport ? false,
   x11Support ? false,
   embedInstallers ? false, # The Mono and Gecko MSI installers
diff --git a/pkgs/applications/emulators/wine/sources.nix b/pkgs/applications/emulators/wine/sources.nix
index 9abb44fd61a4e..cf517bfc0f1a6 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.11";
+    version = "9.18";
     url = "https://dl.winehq.org/wine/source/9.x/wine-${version}.tar.xz";
-    hash = "sha256-36AMJk6nEWnQKoSagz5Iyudh+whCKgDfhkTr1nv4ckA=";
+    hash = "sha256-ZSb1IRwIVFO8tkKUbrLOjR1CqKSmgWi/Kg1z8yYS3Rw=";
     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 = "9.1.0";
+      version = "9.3.0";
       url = "https://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}-x86.msi";
-      hash = "sha256-igoeaDe0lN9Jkn5ddZscaQjom4ovjjrQJeHCiBiCR24=";
+      hash = "sha256-bKLArtCW/57CD69et2xrfX3oLZqIdax92fB5O/nD/TA=";
     };
 
     updateScript = writeShellScript "update-wine-unstable" ''
@@ -117,7 +117,7 @@ in rec {
   staging = fetchFromGitLab rec {
     # https://gitlab.winehq.org/wine/wine-staging
     inherit (unstable) version;
-    hash = "sha256-vqlikMatRlGxvWJ6BJu2HyBclV4x+vzNPNe8py7jKqo=";
+    hash = "sha256-m3tuwb6OFcgZ/NATixIH1j3YgrzsREJNpnVbevN/9FY=";
     domain = "gitlab.winehq.org";
     owner = "wine";
     repo = "wine-staging";
diff --git a/pkgs/applications/emulators/wine/staging.nix b/pkgs/applications/emulators/wine/staging.nix
index 56525d4fa0674..634964fb75330 100644
--- a/pkgs/applications/emulators/wine/staging.nix
+++ b/pkgs/applications/emulators/wine/staging.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, callPackage, autoconf, hexdump, perl, python3, wineUnstable }:
+{ lib, stdenv, callPackage, autoconf, hexdump, perl, python3, wineUnstable, gitMinimal }:
 
 with callPackage ./util.nix {};
 
@@ -8,8 +8,8 @@ let patch = (callPackage ./sources.nix {}).staging;
 in assert lib.versions.majorMinor wineUnstable.version == lib.versions.majorMinor patch.version;
 
 (wineUnstable.override { wineRelease = "staging"; }).overrideAttrs (self: {
-  buildInputs = build-inputs ([ "perl" "autoconf" "gitMinimal" ] ++ lib.optional stdenv.isLinux "util-linux") self.buildInputs;
-  nativeBuildInputs = [ autoconf hexdump perl python3 ] ++ self.nativeBuildInputs;
+  buildInputs = build-inputs ([ "perl" "autoconf" "gitMinimal" ] ++ lib.optional stdenv.hostPlatform.isLinux "util-linux") self.buildInputs;
+  nativeBuildInputs = [ autoconf hexdump perl python3 gitMinimal ] ++ self.nativeBuildInputs;
 
   prePatch = self.prePatch or "" + ''
     patchShebangs tools