2019-06-16 20:59:06 +01:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, writeText, python3
|
2020-07-28 02:07:19 +01:00
|
|
|
, vulkan-headers, vulkan-loader, glslang, spirv-headers
|
2020-01-29 07:06:27 +00:00
|
|
|
, pkgconfig, xlibsWrapper, libxcb, libXrandr, wayland }:
|
2019-08-06 23:42:10 +01:00
|
|
|
|
2018-06-27 04:36:00 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-06 23:42:10 +01:00
|
|
|
pname = "vulkan-validation-layers";
|
2020-07-28 02:07:19 +01:00
|
|
|
version = "1.2.141.0";
|
2018-06-27 04:36:00 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KhronosGroup";
|
|
|
|
repo = "Vulkan-ValidationLayers";
|
|
|
|
rev = "sdk-${version}";
|
2020-07-28 02:07:19 +01:00
|
|
|
sha256 = "1yfas7q122kx74nbjk3wxlyacysgncvlvq081a5dp238m88vkmbj";
|
2018-06-27 04:36:00 +01:00
|
|
|
};
|
|
|
|
|
2020-07-28 02:07:19 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
cmake
|
|
|
|
python3
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glslang
|
|
|
|
spirv-headers
|
|
|
|
vulkan-headers
|
|
|
|
vulkan-loader
|
|
|
|
libxcb
|
|
|
|
libXrandr
|
|
|
|
wayland
|
|
|
|
];
|
|
|
|
|
2018-06-27 04:36:00 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-07-28 02:07:19 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DGLSLANG_INSTALL_DIR=${glslang}"
|
|
|
|
];
|
2018-06-27 04:36:00 +01:00
|
|
|
|
2018-12-07 18:17:57 +00: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 04:36:00 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "LunarG Vulkan loader";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.lunarg.com";
|
2018-06-27 04:36:00 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.ralith ];
|
|
|
|
};
|
|
|
|
}
|