diff options
author | Randy Eckenrode <randy@largeandhighquality.com> | 2023-01-27 00:50:05 -0500 |
---|---|---|
committer | Randy Eckenrode <randy@largeandhighquality.com> | 2023-01-28 14:42:55 -0500 |
commit | 81a86d07e6d9e237004461c2f8de256f4ed83e3e (patch) | |
tree | 555b10a6f84523683e361461faa6c22ed44380a9 /pkgs/misc | |
parent | 67a2ceab6a9529413304cfe5ffed7c6383d88334 (diff) |
dxvk: 2.0 -> 2.1
https://github.com/doitsujin/dxvk/releases/tag/v2.1
Diffstat (limited to 'pkgs/misc')
-rw-r--r-- | pkgs/misc/dxvk/dxvk.nix | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/pkgs/misc/dxvk/dxvk.nix b/pkgs/misc/dxvk/dxvk.nix index e0a104ff354eb..793264f9b30b8 100644 --- a/pkgs/misc/dxvk/dxvk.nix +++ b/pkgs/misc/dxvk/dxvk.nix @@ -9,8 +9,15 @@ , spirv-headers , vulkan-headers , SDL2 +, glfw +, pkgsBuildHost +, sdl2Support ? true +, glfwSupport ? false }: +# SDL2 and GLFW support are mutually exclusive. +assert !sdl2Support || !glfwSupport; + let # DXVK 2.0+ no longer vendors certain dependencies. This derivation also needs to build on Darwin, # which does not currently support DXVK 2.0, so adapt conditionally for this situation. @@ -36,13 +43,13 @@ let ./darwin-thread-primitives.patch ]; }; - "2.0" = rec { - version = "2.0"; + "2.1" = rec { + version = "2.1"; src = fetchFromGitHub { owner = "doitsujin"; repo = "dxvk"; rev = "v${version}"; - hash = "sha256-mSNFvoILsvm+CpWV7uRlb7DkjV7ctClSUdteNcF5EAY="; + hash = "sha256-A4KR11brfQbR56dGt371MRwMN/H6HFAU8TlFC97/bRs="; fetchSubmodules = true; # Needed for the DirectX headers and libdisplay-info }; patches = [ ]; @@ -61,8 +68,14 @@ stdenv.mkDerivation { ++ lib.optionals isDxvk2 ( [ spirv-headers vulkan-headers ] ++ lib.optional (!isWindows && sdl2Support) SDL2 + ++ lib.optional (!isWindows && glfwSupport) glfw ); + postPatch = lib.optionalString isDxvk2 '' + substituteInPlace "subprojects/libdisplay-info/tool/gen-search-table.py" \ + --replace "/usr/bin/env python3" "${lib.getBin pkgsBuildHost.python3}/bin/python3" + ''; + # Build with the Vulkan SDK in nixpkgs. preConfigure = '' rm -rf include/spirv/include include/vulkan/include @@ -77,7 +90,8 @@ stdenv.mkDerivation { "--buildtype" "release" "--prefix" "${placeholder "out"}" ] - ++ lib.optionals isCross [ "--cross-file" "build-win${arch}.txt" ]; + ++ lib.optionals isCross [ "--cross-file" "build-win${arch}.txt" ] + ++ lib.optional glfwSupport "-Ddxvk_native_wsi=glfw"; doCheck = isDxvk2 && !isCross; |