diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix index a19e996064a0..d64f52d90d4d 100644 --- a/pkgs/applications/video/obs-studio/default.nix +++ b/pkgs/applications/video/obs-studio/default.nix @@ -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"; }; -} +}) diff --git a/pkgs/applications/video/obs-studio/plugins/obs-hyperion/default.nix b/pkgs/applications/video/obs-studio/plugins/obs-hyperion/default.nix index c92bdd9346c8..85606e05f0c1 100644 --- a/pkgs/applications/video/obs-studio/plugins/obs-hyperion/default.nix +++ b/pkgs/applications/video/obs-studio/plugins/obs-hyperion/default.nix @@ -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 }; } diff --git a/pkgs/applications/video/obs-studio/plugins/obs-pipewire-audio-capture.nix b/pkgs/applications/video/obs-studio/plugins/obs-pipewire-audio-capture.nix index 622ba7d66e28..f2aef5972dc1 100644 --- a/pkgs/applications/video/obs-studio/plugins/obs-pipewire-audio-capture.nix +++ b/pkgs/applications/video/obs-studio/plugins/obs-pipewire-audio-capture.nix @@ -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"; diff --git a/pkgs/applications/video/obs-studio/plugins/obs-tuna/default.nix b/pkgs/applications/video/obs-studio/plugins/obs-tuna/default.nix index 8fd1b5f96f83..798b23b2c8d7 100644 --- a/pkgs/applications/video/obs-studio/plugins/obs-tuna/default.nix +++ b/pkgs/applications/video/obs-studio/plugins/obs-tuna/default.nix @@ -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 = '' diff --git a/pkgs/by-name/li/libvpl/package.nix b/pkgs/by-name/li/libvpl/package.nix new file mode 100644 index 000000000000..8a647916ca63 --- /dev/null +++ b/pkgs/by-name/li/libvpl/package.nix @@ -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; + }; +}) diff --git a/pkgs/by-name/qr/qrcodegencpp/package.nix b/pkgs/by-name/qr/qrcodegencpp/package.nix new file mode 100644 index 000000000000..655b948e81e1 --- /dev/null +++ b/pkgs/by-name/qr/qrcodegencpp/package.nix @@ -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; + }; +}) diff --git a/pkgs/development/libraries/libcef/default.nix b/pkgs/development/libraries/libcef/default.nix index 2fb83097c02a..d0a9092f6898 100644 --- a/pkgs/development/libraries/libcef/default.nix +++ b/pkgs/development/libraries/libcef/default.nix @@ -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/