24 , vulkan-utility-libraries
31 renderdoc = fetchurl {
32 url = "https://raw.githubusercontent.com/baldurk/renderdoc/v1.1/renderdoc/api/app/renderdoc_app.h";
33 hash = "sha256-57XwqlsbDq3GOhxiTAyn9a8TOqhX1qQnGw7z0L22ho4=";
36 # The build system expects all these dependencies inside the external folder and
37 # does not search for system-wide installations.
38 # It also expects the version specified in the repository, which can be incompatible
39 # with the version in nixpkgs (e.g. for SPIRV-Headers), so we don't want to patch in our packages.
40 # The revisions are extracted from https://github.com/KhronosGroup/VK-GL-CTS/blob/main/external/fetch_sources.py#L290
41 # with the vk-cts-sources.py script.
42 sources = import ./sources.nix { inherit fetchurl fetchFromGitHub; };
44 stdenv.mkDerivation (finalAttrs: {
48 src = fetchFromGitHub {
49 owner = "KhronosGroup";
51 rev = "vulkan-cts-${finalAttrs.version}";
52 hash = "sha256-JCepNBVHaN4KXRcLOZ2z7toBMri90tV7kjNWHRXRESE=";
56 mkdir -p external/renderdoc/src
58 cp -r ${renderdoc} external/renderdoc/src/renderdoc_app.h
62 substituteInPlace external/vulkan-validationlayers/CMakeLists.txt \
63 --replace-fail 'UPDATE_DEPS ON' 'UPDATE_DEPS OFF'
79 vulkan-utility-libraries
99 # Fix cts cmake not coping with absolute install dirs
100 "-DCMAKE_INSTALL_BINDIR=bin"
101 "-DCMAKE_INSTALL_LIBDIR=lib"
102 "-DCMAKE_INSTALL_INCLUDEDIR=include"
104 "-DWAYLAND_SCANNER=wayland-scanner"
105 # For vulkan-validation-layers
106 "-DGLSLANG_INSTALL_DIR=${glslang}"
107 "-DSPIRV_HEADERS_INSTALL_DIR=${spirv-headers}"
111 # Check that nothing was installed so far
114 mkdir -p $out/bin $out/archive-dir
115 cp -a external/vulkancts/modules/vulkan/deqp-vk external/vulkancts/modules/vulkan/deqp-vksc $out/bin/
116 cp -a external/vulkancts/modules/vulkan/vulkan $out/archive-dir/
117 cp -a external/vulkancts/modules/vulkan/vk-default $out/
119 wrapProgram $out/bin/deqp-vk \
120 --add-flags '--deqp-vk-library-path=${vulkan-loader}/lib/libvulkan.so' \
121 --add-flags "--deqp-archive-dir=$out/archive-dir"
124 passthru.updateScript = ./update.sh;
125 passthru.tests.lavapipe = runCommand "vulkan-cts-tests-lavapipe" {
126 nativeBuildInputs = [ finalAttrs.finalPackage mesa.llvmpipeHook ];
128 deqp-vk -n dEQP-VK.api.smoke.triangle
133 description = "Khronos Vulkan Conformance Tests";
134 homepage = "https://github.com/KhronosGroup/VK-GL-CTS/blob/main/external/vulkancts/README.md";
135 changelog = "https://github.com/KhronosGroup/VK-GL-CTS/releases/tag/vulkan-cts-${finalAttrs.version}";
136 license = licenses.asl20;
137 maintainers = with maintainers; [ Flakebi ];