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
|
, alsaLib
|
||||||
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
|
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
|
||||||
, libpulseaudio
|
, libpulseaudio
|
||||||
|
, libcef
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -44,8 +45,9 @@ in mkDerivation rec {
|
|||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "obsproject";
|
owner = "obsproject";
|
||||||
repo = "obs-studio";
|
repo = "obs-studio";
|
||||||
rev = version;
|
rev = "refs/tags/${version}";
|
||||||
sha256 = "1d502f80whh686mvq0yn6zpa5nvmnlzxwp5sjz43vpbbvhpbrdqj";
|
sha256 = "1bf56z2yb7gq1knqwcqj369c3wl9jr3wll5vlngmfy2gwqrczjmw";
|
||||||
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ addOpenGLRunpath cmake pkgconfig ];
|
nativeBuildInputs = [ addOpenGLRunpath cmake pkgconfig ];
|
||||||
@ -55,6 +57,7 @@ in mkDerivation rec {
|
|||||||
fdk_aac
|
fdk_aac
|
||||||
ffmpeg
|
ffmpeg
|
||||||
jansson
|
jansson
|
||||||
|
libcef
|
||||||
libjack2
|
libjack2
|
||||||
libv4l
|
libv4l
|
||||||
libxkbcommon
|
libxkbcommon
|
||||||
@ -73,6 +76,19 @@ in mkDerivation rec {
|
|||||||
++ optional alsaSupport alsaLib
|
++ optional alsaSupport alsaLib
|
||||||
++ optional pulseaudioSupport libpulseaudio;
|
++ 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
|
# 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
|
# DL_OPENGL is an explicit path. Not sure if there's a better way
|
||||||
# to handle this.
|
# to handle this.
|
||||||
@ -80,6 +96,9 @@ in mkDerivation rec {
|
|||||||
"-DCMAKE_CXX_FLAGS=-DDL_OPENGL=\\\"$(out)/lib/libobs-opengl.so\\\""
|
"-DCMAKE_CXX_FLAGS=-DDL_OPENGL=\\\"$(out)/lib/libobs-opengl.so\\\""
|
||||||
"-DOBS_VERSION_OVERRIDE=${version}"
|
"-DOBS_VERSION_OVERRIDE=${version}"
|
||||||
"-Wno-dev" # kill dev warnings that are useless for packaging
|
"-Wno-dev" # kill dev warnings that are useless for packaging
|
||||||
|
# Add support for browser source
|
||||||
|
"-DBUILD_BROWSER=ON"
|
||||||
|
"-DCEF_ROOT_DIR=../../cef"
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user