2019-06-16 21:59:06 +02:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, writeText, python3
|
2018-12-07 19:17:57 +01:00
|
|
|
, vulkan-headers, vulkan-loader, glslang
|
|
|
|
, pkgconfig, xlibsWrapper, libxcb, libXrandr, wayland }:
|
2018-06-27 05:36:00 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "vulkan-validation-layers-${version}";
|
2019-02-17 18:56:48 +01:00
|
|
|
version = "1.1.101.0"; # WARNING: glslang overrides in all-packages.nix must be updated to match known-good.json!
|
2018-06-27 05:36:00 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KhronosGroup";
|
|
|
|
repo = "Vulkan-ValidationLayers";
|
|
|
|
rev = "sdk-${version}";
|
2019-02-17 18:56:48 +01:00
|
|
|
sha256 = "00gz72m393i3m3rh5hv9d0znzlz39cpw35ifchzb4cr11bi4mzyz";
|
2018-06-27 05:36:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2018-07-17 22:11:16 +02:00
|
|
|
buildInputs = [ cmake python3 vulkan-headers vulkan-loader xlibsWrapper libxcb libXrandr wayland ];
|
2018-06-27 05:36:00 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DGLSLANG_INSTALL_DIR=${glslang}" ];
|
|
|
|
|
2018-12-07 19:17:57 +01:00
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
2018-06-27 05:36:00 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "LunarG Vulkan loader";
|
2018-07-20 03:12:04 +02:00
|
|
|
homepage = https://www.lunarg.com;
|
2018-06-27 05:36:00 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.ralith ];
|
|
|
|
};
|
|
|
|
}
|