obs-studio-plugins.obs-vkcapture: enable 32bit support (#188699)

This commit is contained in:
Atemu 2022-08-29 13:57:18 +02:00 committed by GitHub
parent e047cab159
commit d6be38280c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 3 deletions

View File

@ -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 {};
}

View File

@ -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";