1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-05 12:02:47 +00:00
nixpkgs/pkgs/development/tools/vulkan-validation-layers/default.nix

41 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, cmake, writeText, python3
, vulkan-headers, vulkan-loader, glslang
2019-08-06 23:42:10 +01:00
, pkgconfig, xlibsWrapper, libxcb, libXrandr, wayland, spirv-headers }:
stdenv.mkDerivation rec {
2019-08-06 23:42:10 +01:00
pname = "vulkan-validation-layers";
version = "1.1.114.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-ValidationLayers";
rev = "sdk-${version}";
2019-08-06 23:42:10 +01:00
sha256 = "0f8dlrjw1nz2adhzi4sbvljys4h0dyiwafdihsdyrg3xncgffks4";
};
nativeBuildInputs = [ pkgconfig cmake python3 ];
buildInputs = [ vulkan-headers vulkan-loader libxcb libXrandr wayland ];
enableParallelBuilding = true;
cmakeFlags = [ "-DGLSLANG_INSTALL_DIR=${glslang}" ];
# Help vulkan-loader find the validation layers
setupHook = writeText "setup-hook" ''
export XDG_DATA_DIRS=@out@/share:$XDG_DATA_DIRS
'';
# Include absolute paths to layer libraries in their associated
# layer definition json files.
patchPhase = ''
sed "s|\([[:space:]]*set(INSTALL_DEFINES \''${INSTALL_DEFINES} -DRELATIVE_LAYER_BINARY=\"\)\(\$<TARGET_FILE_NAME:\''${TARGET_NAME}>\")\)|\1$out/lib/\2|" -i layers/CMakeLists.txt
'';
meta = with stdenv.lib; {
description = "LunarG Vulkan loader";
2018-07-20 02:12:04 +01:00
homepage = https://www.lunarg.com;
platforms = platforms.linux;
license = licenses.asl20;
maintainers = [ maintainers.ralith ];
};
}