Merge pull request #275544 from CobaltCause/update-obs

obs-studio: 29.1.3 -> 30.0.2
This commit is contained in:
Fabián Heredia Montiel 2024-01-09 15:23:44 -06:00 committed by GitHub
commit d00c65029c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 105 additions and 15 deletions

View File

@ -48,21 +48,24 @@
, asio
, decklinkSupport ? false
, blackmagic-desktop-video
, libdatachannel
, libvpl
, qrcodegencpp
}:
let
inherit (lib) optional optionals;
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "obs-studio";
version = "29.1.3";
version = "30.0.2";
src = fetchFromGitHub {
owner = "obsproject";
repo = "obs-studio";
rev = version;
sha256 = "sha256-D0DPueMtopwz5rLgM8QcPT7DgTKcJKQHnst69EY9V6Q=";
repo = finalAttrs.pname;
rev = finalAttrs.version;
sha256 = "sha256-8pX1kqibrtDIaE1+/Pey1A5bu6MwFTXLrBOah4rsF+4=";
fetchSubmodules = true;
};
@ -108,6 +111,9 @@ stdenv.mkDerivation rec {
nlohmann_json
websocketpp
asio
libdatachannel
libvpl
qrcodegencpp
]
++ optionals scriptingSupport [ luajit python3 ]
++ optional alsaSupport alsa-lib
@ -127,7 +133,7 @@ stdenv.mkDerivation rec {
'';
cmakeFlags = [
"-DOBS_VERSION_OVERRIDE=${version}"
"-DOBS_VERSION_OVERRIDE=${finalAttrs.version}"
"-Wno-dev" # kill dev warnings that are useless for packaging
# Add support for browser source
"-DBUILD_BROWSER=ON"
@ -159,7 +165,7 @@ stdenv.mkDerivation rec {
addOpenGLRunpath $out/lib/obs-plugins/*.so
# Link libcef again after patchelfing other libs
ln -s ${libcef}/lib/libcef.so $out/lib/obs-plugins/libcef.so
ln -s ${libcef}/lib/* $out/lib/obs-plugins/
'';
meta = with lib; {
@ -170,9 +176,9 @@ stdenv.mkDerivation rec {
video content, efficiently
'';
homepage = "https://obsproject.com";
maintainers = with maintainers; [ jb55 MP2E materus ];
maintainers = with maintainers; [ jb55 MP2E materus fpletz ];
license = licenses.gpl2Plus;
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
mainProgram = "obs";
};
}
})

View File

@ -33,6 +33,5 @@ stdenv.mkDerivation rec {
license = licenses.mit;
maintainers = with maintainers; [ algram ];
platforms = [ "x86_64-linux" ];
broken = true; # Not compatible with qt6 yet but required by OBS28
};
}

View File

@ -27,10 +27,6 @@ stdenv.mkDerivation rec {
"-Wno-dev"
];
preConfigure = ''
cp ${obs-studio.src}/cmake/external/ObsPluginHelpers.cmake cmake/FindLibObs.cmake
'';
meta = with lib; {
description = "Audio device and application capture for OBS Studio using PipeWire";
homepage = "https://github.com/dimtpap/obs-pipewire-audio-capture";

View File

@ -28,6 +28,9 @@ stdenv.mkDerivation (finalAttrs: {
fetchSubmodules = true;
};
# obs_frontend_add_dock() deprecated in obs 30
env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
patches = [
# fix build with qt 6.6.0
# treewide: replace deprecated qAsConst with std::as_const()
@ -36,6 +39,11 @@ stdenv.mkDerivation (finalAttrs: {
url = "https://github.com/univrsal/tuna/commit/0d570e771f8d8e6ae7c85bd2b86bbf59c264789e.patch";
hash = "sha256-A5idhMiM9funqhTm5XMIBqwy+FO1SaNPtgZjo+Vws6k=";
})
# fix build with obs 30
(fetchpatch2 {
url = "https://github.com/univrsal/tuna/commit/723bd3c7b4e257cf0997611426e555068de77ae7.patch";
hash = "sha256-MF5vghGYknL6q+A8BJ1yrQcEKIu9I+PWk+RZNYg3fRU=";
})
];
postInstall = ''

View File

@ -0,0 +1,41 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libvpl";
version = "2.10.1";
src = fetchFromGitHub {
owner = "intel";
repo = finalAttrs.pname;
rev = "v${finalAttrs.version}";
hash = "sha256-2yfJo4iwI/h0CJ+mJJ3cAyG5S7KksUibwJHebF3MR+E=";
};
nativeBuildInputs = [
cmake
pkg-config
];
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
"-DENABLE_DRI3=ON"
"-DENABLE_DRM=ON"
"-DENABLE_VA=ON"
"-DENABLE_WAYLAND=ON"
"-DENABLE_X11=ON"
"-DINSTALL_EXAMPLE_CODE=OFF"
"-DBUILD_TOOLS=OFF"
];
meta = with lib; {
description = "Intel Video Processing Library";
homepage = "https://intel.github.io/libvpl/";
license = licenses.mit;
platforms = platforms.linux;
};
})

View File

@ -0,0 +1,32 @@
{ lib
, stdenv
, qrcodegen
}:
stdenv.mkDerivation (finalAttrs: {
pname = "qrcodegencpp";
version = qrcodegen.version;
src = qrcodegen.src;
sourceRoot = "${finalAttrs.src.name}/cpp";
nativeBuildInputs = lib.optionals stdenv.cc.isClang [
stdenv.cc.cc.libllvm.out
];
makeFlags = lib.optionals stdenv.cc.isClang [ "AR=llvm-ar" ];
installPhase = ''
runHook preInstall
install -Dt $out/lib/ libqrcodegencpp.a
install -Dt $out/include/qrcodegen/ qrcodegen.hpp
runHook postInstall
'';
meta = {
inherit (qrcodegen.meta) description homepage license maintainers platforms;
};
})

View File

@ -30,6 +30,10 @@
}:
let
gl_rpath = lib.makeLibraryPath [
stdenv.cc.cc.lib
];
rpath = lib.makeLibraryPath [
glib
nss
@ -92,7 +96,11 @@ stdenv.mkDerivation rec {
mkdir -p $out/lib/ $out/share/cef/
cp libcef_dll_wrapper/libcef_dll_wrapper.a $out/lib/
cp ../Release/libcef.so $out/lib/
cp ../Release/libEGL.so $out/lib/
cp ../Release/libGLESv2.so $out/lib/
patchelf --set-rpath "${rpath}" $out/lib/libcef.so
patchelf --set-rpath "${gl_rpath}" $out/lib/libEGL.so
patchelf --set-rpath "${gl_rpath}" $out/lib/libGLESv2.so
cp ../Release/*.bin $out/share/cef/
cp -r ../Resources/* $out/share/cef/
cp -r ../include $out/