3
0
Fork 0
forked from mirrors/nixpkgs

vulkan-tools: fix build on darwin

This commit is contained in:
Weijia Wang 2024-01-27 17:12:21 +01:00
parent 1eb10bd6bd
commit 11b4c5b070

View file

@ -60,17 +60,6 @@ stdenv.mkDerivation rec {
Cocoa
];
postPatch = lib.optionalString stdenv.isDarwin ''
# Modify mac_common.cmake to find the ICD where nixpkgs puts it.
substituteInPlace mac_common.cmake \
--replace MoltenVK/icd/MoltenVK_icd.json MoltenVK_icd.json
# Remove the unconditional check for `ibtool` since the cube demo that needs it wont be built.
sed -e '/#.*Interface Builder/,/^endif()/d' -i mac_common.cmake
# Install `vulkaninfo` to $out/bin even on Darwin.
substituteInPlace vulkaninfo/CMakeLists.txt \
--replace 'install(TARGETS vulkaninfo RUNTIME DESTINATION "vulkaninfo")' 'install(TARGETS vulkaninfo)'
'';
libraryPath = lib.strings.makeLibraryPath [ vulkan-loader ];
dontPatchELF = true;