mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 08:59:32 +03:00
Merge pull request #215612 from expipiplus1/ellie-vvl
vulkan-validation-layers: Fix path to layer binary in layer description
This commit is contained in:
commit
dff309ee2a
@ -4,6 +4,7 @@
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, jq
|
||||
, glslang
|
||||
, libffi
|
||||
, libX11
|
||||
@ -37,15 +38,10 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-+VbiXtxzYaF5o+wIrJ+09LmgBdaLv/0VJGFDnBkrXms=";
|
||||
});
|
||||
|
||||
# Include absolute paths to layer libraries in their associated
|
||||
# layer definition json files.
|
||||
postPatch = ''
|
||||
sed "s|\([[:space:]]*set(INSTALL_DEFINES \''${INSTALL_DEFINES} -DRELATIVE_LAYER_BINARY=\"\)\(\$<TARGET_FILE_NAME:\''${TARGET_NAME}>\")\)|\1$out/lib/\2|" -i layers/CMakeLists.txt
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
jq
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -74,6 +70,15 @@ stdenv.mkDerivation rec {
|
||||
# available in Nix sandbox. Fails with VK_ERROR_INCOMPATIBLE_DRIVER.
|
||||
doCheck = false;
|
||||
|
||||
# Include absolute paths to layer libraries in their associated
|
||||
# layer definition json files.
|
||||
preFixup = ''
|
||||
for f in "$out"/share/vulkan/explicit_layer.d/*.json "$out"/share/vulkan/implicit_layer.d/*.json; do
|
||||
jq <"$f" >tmp.json ".layer.library_path = \"$out/lib/\" + .layer.library_path"
|
||||
mv tmp.json "$f"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "The official Khronos Vulkan validation layers";
|
||||
homepage = "https://github.com/KhronosGroup/Vulkan-ValidationLayers";
|
||||
|
Loading…
Reference in New Issue
Block a user