summary refs log tree commit diff
path: root/pkgs/misc/dxvk/dxvk.nix
blob: 2eb4f30df2bc35357836effa47015e6b6fb92ae9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, stdenv
, fetchFromGitHub
, glslang
, meson
, ninja
, windows
, src
, version
, dxvkPatches
}:

stdenv.mkDerivation {
  pname = "dxvk";
  inherit src version;

  nativeBuildInputs = [ glslang meson ninja ];
  buildInputs = [ windows.pthreads ];

  patches = dxvkPatches;

  mesonFlags =
    let
      arch = if stdenv.is32bit then "32" else "64";
    in
    [
      "--buildtype" "release"
      "--cross-file" "build-win${arch}.txt"
      "--prefix" "${placeholder "out"}"
    ];

  meta = {
    description = "A Vulkan-based translation layer for Direct3D 9/10/11";
    homepage = "https://github.com/doitsujin/dxvk";
    changelog = "https://github.com/doitsujin/dxvk/releases";
    maintainers = [ lib.maintainers.reckenrode ];
    license = lib.licenses.zlib;
    platforms = lib.platforms.windows;
  };
}