Merge master into staging
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
libXext, wayland, libGL_driver, makeWrapper }:
|
||||
|
||||
let
|
||||
version = "1.0.61.1";
|
||||
version = "1.1.70.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "Vulkan-LoaderAndValidationLayers";
|
||||
rev = "sdk-${version}";
|
||||
sha256 = "043kw6wnrpdplnb40x6n9rgf3gygsn9jiv91y458sydbhalfr945";
|
||||
sha256 = "1a7xwl65bi03l4zbjq54qkxjb8kb4m78qvw8bas5alhf9v6i6yqp";
|
||||
};
|
||||
in
|
||||
|
||||
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
||||
buildInputs = [ cmake git python3 python3Packages.lxml
|
||||
glslang spirv-tools x11 libxcb libXrandr libXext wayland
|
||||
glslang x11 libxcb libXrandr libXext wayland
|
||||
];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -28,13 +28,18 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" "demos" ];
|
||||
patches = [ ./rev-file.patch ];
|
||||
|
||||
postUnpack = ''
|
||||
# Hack so a version header can be generated. Relies on ./rev-file.patch to work.
|
||||
mkdir -p "$sourceRoot/external/glslang/External"
|
||||
echo "${spirv-tools.src.rev}" > "$sourceRoot/external/glslang/External/spirv-tools"
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
checkRev() {
|
||||
[ "$2" = $(cat "external_revisions/$1_revision") ] || (echo "ERROR: dependency $1 is revision $2 but should be revision" $(cat "external_revisions/$1_revision") && exit 1)
|
||||
}
|
||||
checkRev spirv-tools "${spirv-tools.src.rev}"
|
||||
checkRev spirv-headers "${spirv-tools.headers.rev}"
|
||||
checkRev glslang "${glslang.src.rev}"
|
||||
'';
|
||||
|
||||
|
||||
21
pkgs/development/libraries/vulkan-loader/rev-file.patch
Normal file
21
pkgs/development/libraries/vulkan-loader/rev-file.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c9f73ce96..d14ffeed9 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -339,13 +339,13 @@ macro(run_vk_xml_generate dependency output)
|
||||
endmacro()
|
||||
|
||||
# Define macro used for generating header files containing commit IDs for external dependencies
|
||||
-macro(run_external_revision_generate source_dir symbol_name output)
|
||||
+macro(run_external_revision_generate rev_file symbol_name output)
|
||||
add_custom_command(OUTPUT ${output}
|
||||
# NOTE: If you modify this call to use --rev_file instead of --git_dir (to read the commit ID from a file instead of
|
||||
# parsing from a Git repository), you probably also want to add the revision file to the list of DEPENDS on the
|
||||
# subsequent line (to ensure that the script is re-run when the revision file is modified).
|
||||
- COMMAND ${PYTHON_CMD} ${SCRIPTS_DIR}/external_revision_generator.py --git_dir ${source_dir} -s ${symbol_name} -o ${output}
|
||||
- DEPENDS ${SCRIPTS_DIR}/external_revision_generator.py ${source_dir}/.git/HEAD ${source_dir}/.git/index
|
||||
+ COMMAND ${PYTHON_CMD} ${SCRIPTS_DIR}/external_revision_generator.py --rev_file ${rev_file} -s ${symbol_name} -o ${output}
|
||||
+ DEPENDS ${SCRIPTS_DIR}/external_revision_generator.py ${rev_file}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
Reference in New Issue
Block a user