Merge pull request #99284 from Munksgaard/bump-obs

obs-studio: Add builtin support for browser source
This commit is contained in:
Martin Weinelt 2020-11-12 19:12:54 +01:00 committed by GitHub
commit a6c7b75e4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 57 deletions

View file

@ -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,18 @@ 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/
'';
# 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 +95,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 = ''

View file

@ -1,49 +0,0 @@
# We don't have a wrapper which can supply obs-studio plugins so you have to
# somewhat manually install this:
# nix-env -f . -iA obs-linuxbrowser
# mkdir -p ~/.config/obs-studio/plugins
# ln -s ~/.nix-profile/share/obs/obs-plugins/obs-linuxbrowser ~/.config/obs-studio/plugins/
{ stdenv, fetchFromGitHub, obs-studio, cmake, libcef }:
stdenv.mkDerivation rec {
pname = "obs-linuxbrowser";
version = "0.6.1-6-gf86dba6";
src = fetchFromGitHub {
owner = "bazukas";
repo = "obs-linuxbrowser";
rev = version;
sha256 = "08d7qz0721va88bcyia8p0ycw50f6x3yk97s3vzhsc9xpq691kpi";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ obs-studio ];
postUnpack = ''
mkdir -p cef/Release cef/Resources cef/libcef_dll_wrapper/
for i in ${libcef}/share/cef/*; do
ln -s $i cef/Release/
ln -s $i cef/Resources/
done
ln -s ${libcef}/lib/libcef.so cef/Release/
ln -s ${libcef}/lib/libcef_dll_wrapper.a cef/libcef_dll_wrapper/
ln -s ${libcef}/include cef/
'';
cmakeFlags = [
"-DCEF_ROOT_DIR=../../cef"
"-DOBS_INCLUDE_SEARCH_DIR=${obs-studio}/include/obs"
];
installPhase = ''
mkdir -p $out/share/obs/obs-plugins
cp -r build/obs-linuxbrowser $out/share/obs/obs-plugins/
'';
meta = with stdenv.lib; {
description = "Browser source plugin for obs-studio based on Chromium Embedded Framework";
homepage = "https://github.com/bazukas/obs-linuxbrowser";
maintainers = with maintainers; [ puffnfresh ];
license = licenses.gpl2;
platforms = with platforms; linux;
};
}

View file

@ -15,12 +15,12 @@ let
in
stdenv.mkDerivation rec {
pname = "cef-binary";
version = "74.1.14-g50c3c5c";
version = "75.1.14-gc81164e";
src = fetchurl {
name = "cef_binary_74.1.14+g50c3c5c+chromium-74.0.3729.131_linux64_minimal.tar.bz2";
url = "http://opensource.spotify.com/cefbuilds/cef_binary_74.1.19%2Bgb62bacf%2Bchromium-74.0.3729.157_linux64_minimal.tar.bz2";
sha256 = "0v3540kq4y68gq7mb4d8a9issm363lm5ngrd6d96pcc7vckkw4wn";
name = "cef_binary_75.1.14+gc81164e+chromium-75.0.3770.100_linux64_minimal.tar.bz2";
url = "http://opensource.spotify.com/cefbuilds/cef_binary_75.1.14%2Bgc81164e%2Bchromium-75.0.3770.100_linux64_minimal.tar.bz2";
sha256 = "0985b2bx505j0q693hifjgidzb597wqf5idql5aqxs8lfxhc2pgg";
};
nativeBuildInputs = [ cmake ];

View file

@ -22822,8 +22822,6 @@ in
inherit (gnome2) libglade;
};
obs-linuxbrowser = callPackage ../applications/video/obs-studio/linuxbrowser.nix { };
obs-studio = libsForQt514.callPackage ../applications/video/obs-studio { };
obs-wlrobs = callPackage ../applications/video/obs-studio/wlrobs.nix { };