python313Packages.yalexs: 8.10.0 -> 8.11.0 (#375890)
[NixPkgs.git] / pkgs / by-name / vu / vulkan-validation-layers / package.nix
blob9aaebeb5b4ed5726a233e211c29b9fb10c0568b5
2   lib,
3   callPackage,
4   stdenv,
5   fetchFromGitHub,
6   cmake,
7   pkg-config,
8   jq,
9   glslang,
10   libffi,
11   libX11,
12   libXau,
13   libxcb,
14   libXdmcp,
15   libXrandr,
16   spirv-headers,
17   spirv-tools,
18   vulkan-headers,
19   vulkan-utility-libraries,
20   wayland,
23 let
24   robin-hood-hashing = callPackage ./robin-hood-hashing.nix { };
26 stdenv.mkDerivation rec {
27   pname = "vulkan-validation-layers";
28   version = "1.3.296.0";
30   src = fetchFromGitHub {
31     owner = "KhronosGroup";
32     repo = "Vulkan-ValidationLayers";
33     rev = "vulkan-sdk-${version}";
34     hash = "sha256-H5AG+PXM3IdCfDqHMdaunRUWRm8QgdS6ZbZLMaOOALk=";
35   };
37   strictDeps = true;
39   nativeBuildInputs = [
40     cmake
41     pkg-config
42     jq
43   ];
45   buildInputs = [
46     glslang
47     libX11
48     libXau
49     libXdmcp
50     libXrandr
51     libffi
52     libxcb
53     robin-hood-hashing
54     spirv-headers
55     spirv-tools
56     vulkan-headers
57     vulkan-utility-libraries
58     wayland
59   ];
61   cmakeFlags = [
62     "-DBUILD_LAYER_SUPPORT_FILES=ON"
63     # Hide dev warnings that are useless for packaging
64     "-Wno-dev"
65   ];
67   # Tests require access to vulkan-compatible GPU, which isn't
68   # available in Nix sandbox. Fails with VK_ERROR_INCOMPATIBLE_DRIVER.
69   doCheck = false;
71   separateDebugInfo = true;
73   # Include absolute paths to layer libraries in their associated
74   # layer definition json files.
75   preFixup = ''
76     for f in "$out"/share/vulkan/explicit_layer.d/*.json "$out"/share/vulkan/implicit_layer.d/*.json; do
77       jq <"$f" >tmp.json ".layer.library_path = \"$out/lib/\" + .layer.library_path"
78       mv tmp.json "$f"
79     done
80   '';
82   meta = with lib; {
83     description = "Official Khronos Vulkan validation layers";
84     homepage = "https://github.com/KhronosGroup/Vulkan-ValidationLayers";
85     platforms = platforms.linux;
86     license = licenses.asl20;
87     maintainers = [ maintainers.ralith ];
88   };