@@ -1,22 +1,33 @@
1−{ stdenv, fetchFromGitHub, cmake, python3, vulkan-loader, vulkan-headers,
2− glslang, pkgconfig, xlibsWrapper, libxcb, libXrandr, wayland }:
1+{ stdenv, lib, fetchFromGitHub, cmake, python3, vulkan-loader,
2+ vulkan-headers, glslang, pkgconfig, xlibsWrapper, libxcb,
3+ libXrandr, wayland }:
34
45stdenv.mkDerivation rec {
56 pname = "vulkan-tools";
6− version = "1.2.131.1";
7+ version = "1.2.141.0";
78
89 src = fetchFromGitHub {
910 owner = "KhronosGroup";
1011 repo = "Vulkan-Tools";
1112 rev = "sdk-${version}";
12− sha256 = "0ws47ansrr8cq4qjf6k4q0ygm9wwd3w7mhwqcl1qxms8lh5vmhfq";
13+ sha256 = "1ch56ihm7rmilipfyc4i4ww7l6i20fb3qikkpm1ch43kzn42zjaw";
1314 };
1415
1516 nativeBuildInputs = [ cmake pkgconfig ];
1617 buildInputs = [ python3 vulkan-headers vulkan-loader xlibsWrapper libxcb libXrandr wayland ];
1718 enableParallelBuilding = true;
1819
19− cmakeFlags = [ "-DBUILD_ICD=OFF" "-DGLSLANG_INSTALL_DIR=${glslang}" ];
20+ libraryPath = lib.strings.makeLibraryPath [ vulkan-loader ];
21+
22+ dontPatchELF = true;
23+
24+ cmakeFlags = [
25+ # Don't build the mock ICD as it may get used instead of other drivers, if installed
26+ "-DBUILD_ICD=OFF"
27+ "-DGLSLANG_INSTALL_DIR=${glslang}"
28+ # vulkaninfo loads libvulkan using dlopen, so we have to add it manually to RPATH
29+ "-DCMAKE_INSTALL_RPATH=${libraryPath}"
30+ ];
2031
2132 meta = with stdenv.lib; {
2233 description = "LunarG Vulkan loader";