1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 ninja,
7}:
8stdenv.mkDerivation rec {
9 pname = "vulkan-headers";
10 version = "1.4.313.0";
11
12 # Adding `ninja` here to enable Ninja backend. Otherwise on gcc-14 or
13 # later the build fails as:
14 # modules are not supported by this generator: Unix Makefiles
15 nativeBuildInputs = [
16 cmake
17 ninja
18 ];
19
20 # TODO: investigate why <algorithm> isn't found
21 cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DVULKAN_HEADERS_ENABLE_MODULE=OFF" ];
22
23 src = fetchFromGitHub {
24 owner = "KhronosGroup";
25 repo = "Vulkan-Headers";
26 rev = "vulkan-sdk-${version}";
27 hash = "sha256-cbt0QHifjRCak+3V9J5PjNXDIEBvnwVYFa7rcmNv1VU=";
28 };
29
30 passthru.updateScript = ./update.sh;
31
32 meta = with lib; {
33 description = "Vulkan Header files and API registry";
34 homepage = "https://www.lunarg.com";
35 platforms = platforms.unix ++ platforms.windows;
36 license = licenses.asl20;
37 maintainers = [ maintainers.ralith ];
38 };
39}