9 , enableMoltenVKCompat ? false
12 stdenv.mkDerivation (finalAttrs: {
16 src = fetchFromGitHub {
19 rev = "v${finalAttrs.version}";
20 hash = "sha256-T93ZylxzJGprrP+j6axZwl2d3hJowMCUOKNjIyNzkmE=";
23 # These patches are required when using DXVK with Wine on Darwin.
24 patches = lib.optionals enableMoltenVKCompat [
25 # Patch DXVK to work with MoltenVK even though it doesn’t support some required features.
26 # Some games work poorly (particularly Unreal Engine 4 games), but others work pretty well.
27 ./darwin-dxvk-compat.patch
28 # Use synchronization primitives from the C++ standard library to avoid deadlocks on Darwin.
29 # See: https://www.reddit.com/r/macgaming/comments/t8liua/comment/hzsuce9/
30 ./darwin-thread-primitives.patch
33 nativeBuildInputs = [ glslang meson ninja ];
34 buildInputs = [ windows.pthreads ];
37 "--buildtype" "release"
38 "--prefix" "${placeholder "out"}"
42 description = "A Vulkan-based translation layer for Direct3D 9/10/11";
43 homepage = "https://github.com/doitsujin/dxvk";
44 changelog = "https://github.com/doitsujin/dxvk/releases";
45 maintainers = [ lib.maintainers.reckenrode ];
46 license = lib.licenses.zlib;
47 platforms = lib.platforms.windows;