diff options
author | Atemu <atemu.main@gmail.com> | 2022-08-29 13:57:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 13:57:18 +0200 |
commit | d6be38280c48808937dfa8b03ae3b89e48f0ed0c (patch) | |
tree | dc71f06e8eaa44f57098cfb28cc0019fc8ba79cf /pkgs/applications/video | |
parent | e047cab1590652ae1325cbac72b18ae0e9cc0885 (diff) |
obs-studio-plugins.obs-vkcapture: enable 32bit support (#188699)
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r-- | pkgs/applications/video/obs-studio/plugins/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix | 24 |
2 files changed, 27 insertions, 3 deletions
diff --git a/pkgs/applications/video/obs-studio/plugins/default.nix b/pkgs/applications/video/obs-studio/plugins/default.nix index 3d547b4c2dd4a..a6a4ea5721437 100644 --- a/pkgs/applications/video/obs-studio/plugins/default.nix +++ b/pkgs/applications/video/obs-studio/plugins/default.nix @@ -1,4 +1,4 @@ -{ callPackage, libsForQt5 }: +{ callPackage, libsForQt5, pkgsi686Linux }: { obs-gstreamer = callPackage ./obs-gstreamer.nix {}; @@ -10,6 +10,8 @@ looking-glass-obs = callPackage ./looking-glass-obs.nix {}; obs-nvfbc = callPackage ./obs-nvfbc.nix {}; obs-pipewire-audio-capture = callPackage ./obs-pipewire-audio-capture.nix {}; - obs-vkcapture = callPackage ./obs-vkcapture.nix {}; + obs-vkcapture = callPackage ./obs-vkcapture.nix { + obs-vkcapture32 = pkgsi686Linux.obs-studio-plugins.obs-vkcapture; + }; obs-backgroundremoval = callPackage ./obs-backgroundremoval.nix {}; } diff --git a/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix b/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix index 9b216c9e4cebd..7b151f0751b69 100644 --- a/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix +++ b/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix @@ -9,6 +9,7 @@ , vulkan-headers , vulkan-loader , libGL +, obs-vkcapture32 }: stdenv.mkDerivation rec { @@ -22,8 +23,29 @@ stdenv.mkDerivation rec { hash = "sha256-yaN0am24p9gC+s64Rop+jQ3952UOtZund/KttnVxP48="; }; + cmakeFlags = lib.optionals stdenv.isi686 [ + # We don't want to build the plugin for 32bit. The library integrates with + # the 64bit plugin but it's necessary to be loaded into 32bit games. + "-DBUILD_PLUGIN=OFF" + ]; + nativeBuildInputs = [ cmake ninja ]; - buildInputs = [ libGL libX11 obs-studio vulkan-headers vulkan-loader wayland ]; + buildInputs = [ + libGL + libX11 + vulkan-headers + vulkan-loader + wayland + ] + ++ lib.optionals (!stdenv.isi686) [ + obs-studio + ]; + + # Support 32bit Vulkan applications by linking in the 32bit Vulkan layer + 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/" + ''; meta = with lib; { description = "OBS Linux Vulkan/OpenGL game capture"; |