about summary refs log tree commit diff
path: root/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix')
-rw-r--r--pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix b/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix
index e059412e17fa1..cf88fd3b18c3f 100644
--- a/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix
+++ b/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix
@@ -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; {