1{ stdenv, fetchFromGitHub, cmake, python3, vulkan-headers, pkgconfig
2, xlibsWrapper, libxcb, libXrandr, libXext, wayland, libGL_driver }:
3
4let
5 version = "1.1.85";
6in
7
8assert version == vulkan-headers.version;
9stdenv.mkDerivation rec {
10 name = "vulkan-loader-${version}";
11 inherit version;
12
13 src = fetchFromGitHub {
14 owner = "KhronosGroup";
15 repo = "Vulkan-Loader";
16 rev = "b02f64293680c484e1d7ff6ecb88f89277c0dc8c";
17 sha256 = "1n4vjyxlmi2ygx34srwbvalc5gz95gcsrmdw0k10353xja755gmj";
18 };
19
20 nativeBuildInputs = [ pkgconfig ];
21 buildInputs = [ cmake python3 xlibsWrapper libxcb libXrandr libXext wayland ];
22 enableParallelBuilding = true;
23
24 cmakeFlags = [
25 "-DFALLBACK_DATA_DIRS=${libGL_driver.driverLink}/share:/usr/local/share:/usr/share"
26 "-DVULKAN_HEADERS_INSTALL_DIR=${vulkan-headers}"
27 ];
28
29 outputs = [ "out" "dev" ];
30
31 postInstall = ''
32 cp -r "${vulkan-headers}/include" "$dev"
33 '';
34
35 meta = with stdenv.lib; {
36 description = "LunarG Vulkan loader";
37 homepage = https://www.lunarg.com;
38 platforms = platforms.linux;
39 license = licenses.asl20;
40 maintainers = [ maintainers.ralith ];
41 };
42}