obs-vkcapture: install 32bit wrappers

obs-vkcapture supports OGL but one must preload the so. Upstream provides
wrappers for that which you're supposed to use but it's bound to a single
bitness. Install symlinks to the 32bit gamecapture with a suffix to provide
access to both.
This commit is contained in:
Atemu 2024-06-21 14:31:17 +02:00
parent c00d587b1a
commit bc3c785362

View File

@ -61,10 +61,17 @@ stdenv.mkDerivation (finalAttrs: {
--replace "libvulkan.so.1" "${lib.getLib vulkan-loader}/lib/libvulkan.so.1"
'';
# Support 32bit Vulkan applications by linking in the 32bit Vulkan layer
# Support 32bit Vulkan applications by linking in the 32bit Vulkan layer and
# the wrapper executables. Note that vkcapture and glcapture are themselves
# wrapper scripts that simply exec gamecapture and print a warning but because
# they take gamecapture from PATH, we must link them to the 32 bit gamecapture
# directly.
postInstall = lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
ln -s ${obs-vkcapture32}/share/vulkan/implicit_layer.d/obs_vkcapture_32.json \
"$out/share/vulkan/implicit_layer.d/"
for bin in ${obs-vkcapture32}/bin/* ; do
ln -s ${obs-vkcapture32}/bin/obs-gamecapture "$out/bin/$(basename "$bin")32"
done
'';
meta = with lib; {