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