1 { lib, stdenv, fetchFromGitHub, cmake, pkg-config, writeText, vulkan-headers, vulkan-utility-libraries, jq, libX11, libXrandr, libxcb, wayland }:
3 stdenv.mkDerivation rec {
4 pname = "vulkan-extension-layer";
7 src = fetchFromGitHub {
8 owner = "KhronosGroup";
9 repo = "Vulkan-ExtensionLayer";
10 rev = "vulkan-sdk-${version}";
11 hash = "sha256-Cz4C8HoyP768H9ZI7Ys9oX3/qEEhz6vfkdKXoVfodT0=";
14 nativeBuildInputs = [ cmake pkg-config jq ];
16 buildInputs = [ vulkan-headers vulkan-utility-libraries libX11 libXrandr libxcb wayland ];
18 # Help vulkan-loader find the validation layers
19 setupHook = writeText "setup-hook" ''
20 addToSearchPath XDG_DATA_DIRS @out@/share
23 # Tests are not for gpu-less and headless environments
28 # Include absolute paths to layer libraries in their associated
29 # layer definition json files.
31 for f in "$out"/share/vulkan/explicit_layer.d/*.json "$out"/share/vulkan/implicit_layer.d/*.json; do
32 jq <"$f" >tmp.json ".layer.library_path = \"$out/lib/\" + .layer.library_path"
38 description = "Layers providing Vulkan features when native support is unavailable";
39 homepage = "https://github.com/KhronosGroup/Vulkan-ExtensionLayer/";
40 platforms = platforms.linux;
41 license = licenses.asl20;
42 maintainers = with maintainers; [ expipiplus1 ];