about summary refs log tree commit diff
path: root/pkgs/by-name/dx/dxvk_1/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/dx/dxvk_1/package.nix')
-rw-r--r--pkgs/by-name/dx/dxvk_1/package.nix60
1 files changed, 37 insertions, 23 deletions
diff --git a/pkgs/by-name/dx/dxvk_1/package.nix b/pkgs/by-name/dx/dxvk_1/package.nix
index a02680d77eecf..71223ecea2180 100644
--- a/pkgs/by-name/dx/dxvk_1/package.nix
+++ b/pkgs/by-name/dx/dxvk_1/package.nix
@@ -1,15 +1,16 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, glslang
-, meson
-, ninja
-, windows
-, pkgsBuildHost
-, enableMoltenVKCompat ? false
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  fetchpatch,
+  glslang,
+  meson,
+  ninja,
+  windows,
+  enableMoltenVKCompat ? false,
 }:
 
-stdenv.mkDerivation (finalAttrs:  {
+stdenv.mkDerivation (finalAttrs: {
   pname = "dxvk";
   version = "1.10.3";
 
@@ -21,22 +22,35 @@ stdenv.mkDerivation (finalAttrs:  {
   };
 
   # These patches are required when using DXVK with Wine on Darwin.
-  patches = lib.optionals enableMoltenVKCompat [
-    # Patch DXVK to work with MoltenVK even though it doesn’t support some required features.
-    # Some games work poorly (particularly Unreal Engine 4 games), but others work pretty well.
-    ./darwin-dxvk-compat.patch
-    # Use synchronization primitives from the C++ standard library to avoid deadlocks on Darwin.
-    # See: https://www.reddit.com/r/macgaming/comments/t8liua/comment/hzsuce9/
-    ./darwin-thread-primitives.patch
-  ];
+  patches =
+    [
+      # Fixes errors building with GCC 13.
+      (fetchpatch {
+        url = "https://github.com/doitsujin/dxvk/commit/1a5afc77b1859e6c7e31b55e11ece899e3b5295a.patch";
+        hash = "sha256-tTAsQOMAazgH/6laLNTuG2lki257VUR9EBivnD4vCuY=";
+      })
+    ]
+    ++ lib.optionals enableMoltenVKCompat [
+      # Patch DXVK to work with MoltenVK even though it doesn’t support some required features.
+      # Some games work poorly (particularly Unreal Engine 4 games), but others work pretty well.
+      ./darwin-dxvk-compat.patch
+      # Use synchronization primitives from the C++ standard library to avoid deadlocks on Darwin.
+      # See: https://www.reddit.com/r/macgaming/comments/t8liua/comment/hzsuce9/
+      ./darwin-thread-primitives.patch
+    ];
 
-  nativeBuildInputs = [ glslang meson ninja ];
-  buildInputs = [ windows.pthreads ];
+  strictDeps = true;
 
-  mesonFlags = [
-    "--buildtype" "release"
-    "--prefix" "${placeholder "out"}"
+  nativeBuildInputs = [
+    glslang
+    meson
+    ninja
   ];
+  buildInputs = [ windows.pthreads ];
+
+  mesonBuildType = "release";
+
+  __structuredAttrs = true;
 
   meta = {
     description = "A Vulkan-based translation layer for Direct3D 9/10/11";