obs-studio: Enable builtin browser support
Since version 25, OBS Studio has shipped with a version of obs-browser that includes linux support (which means that we don't need the obs-linuxbrowser any more). This commit enables the builtin browser source. Fixes #98035 Thanks to @mohe2015 for fixing a patchelf issue I had!
This commit is contained in:
parent
de5875a4d3
commit
f0d31b3bd1
@ -32,6 +32,7 @@
|
||||
, alsaLib
|
||||
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
|
||||
, libpulseaudio
|
||||
, libcef
|
||||
}:
|
||||
|
||||
let
|
||||
@ -44,8 +45,9 @@ in mkDerivation rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "obsproject";
|
||||
repo = "obs-studio";
|
||||
rev = version;
|
||||
sha256 = "1d502f80whh686mvq0yn6zpa5nvmnlzxwp5sjz43vpbbvhpbrdqj";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "1bf56z2yb7gq1knqwcqj369c3wl9jr3wll5vlngmfy2gwqrczjmw";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ addOpenGLRunpath cmake pkgconfig ];
|
||||
@ -55,6 +57,7 @@ in mkDerivation rec {
|
||||
fdk_aac
|
||||
ffmpeg
|
||||
jansson
|
||||
libcef
|
||||
libjack2
|
||||
libv4l
|
||||
libxkbcommon
|
||||
@ -73,6 +76,19 @@ in mkDerivation rec {
|
||||
++ optional alsaSupport alsaLib
|
||||
++ optional pulseaudioSupport libpulseaudio;
|
||||
|
||||
# Copied from the obs-linuxbrowser
|
||||
postUnpack = ''
|
||||
mkdir -p cef/Release cef/Resources cef/libcef_dll_wrapper/
|
||||
for i in ${libcef}/share/cef/*; do
|
||||
cp -r $i cef/Release/
|
||||
cp -r $i cef/Resources/
|
||||
done
|
||||
cp -r ${libcef}/lib/libcef.so cef/Release/
|
||||
cp -r ${libcef}/lib/libcef_dll_wrapper.a cef/libcef_dll_wrapper/
|
||||
cp -r ${libcef}/include cef/
|
||||
ls -R cef
|
||||
'';
|
||||
|
||||
# obs attempts to dlopen libobs-opengl, it fails unless we make sure
|
||||
# DL_OPENGL is an explicit path. Not sure if there's a better way
|
||||
# to handle this.
|
||||
@ -80,6 +96,9 @@ in mkDerivation rec {
|
||||
"-DCMAKE_CXX_FLAGS=-DDL_OPENGL=\\\"$(out)/lib/libobs-opengl.so\\\""
|
||||
"-DOBS_VERSION_OVERRIDE=${version}"
|
||||
"-Wno-dev" # kill dev warnings that are useless for packaging
|
||||
# Add support for browser source
|
||||
"-DBUILD_BROWSER=ON"
|
||||
"-DCEF_ROOT_DIR=../../cef"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
|
Loading…
Reference in New Issue
Block a user