diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/video/obs-studio')
8 files changed, 80 insertions, 53 deletions
diff --git a/nixpkgs/pkgs/applications/video/obs-studio/default.nix b/nixpkgs/pkgs/applications/video/obs-studio/default.nix index a19e996064a0..74b19296dbdf 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/default.nix +++ b/nixpkgs/pkgs/applications/video/obs-studio/default.nix @@ -2,10 +2,11 @@ , lib , stdenv , fetchFromGitHub +, fetchpatch , addOpenGLRunpath , cmake , fdk_aac -, ffmpeg_4 +, ffmpeg , jansson , libjack2 , libxkbcommon @@ -35,6 +36,7 @@ , libcef , pciutils , pipewireSupport ? stdenv.isLinux +, withFdk ? true , pipewire , libdrm , libajantv2 @@ -48,21 +50,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; }; @@ -70,6 +75,25 @@ stdenv.mkDerivation rec { # Lets obs-browser build against CEF 90.1.0+ ./Enable-file-access-and-universal-access-for-file-URL.patch ./fix-nix-plugin-path.patch + + # Backport ffmpeg 6.1 / GCC 13 build fixes + # FIXME: remove in next release + (fetchpatch { + url = "https://github.com/obsproject/obs-studio/commit/cd784644f5e82b9988043f229c19603289c6d32c.patch"; + hash = "sha256-S4JE5kgr4x3uMHY2GRh0GBJpb7o/wYZb/v0CDITFNnQ="; + }) + (fetchpatch { + url = "https://github.com/obsproject/obs-studio/commit/758b47d4ed9a25b8d64ad481d8d039990b9e57c9.patch"; + hash = "sha256-jYpjwhx6e+dhN3kzbd6FcdjQ+WhIX0/BOu9PSkt+2yI="; + }) + (fetchpatch { + url = "https://github.com/obsproject/obs-studio/commit/4b5be75c7e4b8cee908ed4a02fe0078285b4e8c9.patch"; + hash = "sha256-tuOevhyxchwG42ilrplbiWoiDAKaY4HgzShlvp4VSQI="; + }) + (fetchpatch { + url = "https://github.com/obsproject/obs-studio/commit/6e080a68067b27fe5463f0f4eee7df690451f3d7.patch"; + hash = "sha256-nbn/q3uszoHaDvaW8Et1MS1sgQzMsJRmjGSMHzUxV70="; + }) ]; nativeBuildInputs = [ @@ -83,8 +107,7 @@ stdenv.mkDerivation rec { buildInputs = [ curl - fdk_aac - ffmpeg_4 + ffmpeg jansson libcef libjack2 @@ -108,11 +131,15 @@ stdenv.mkDerivation rec { nlohmann_json websocketpp asio + libdatachannel + libvpl + qrcodegencpp ] ++ optionals scriptingSupport [ luajit python3 ] ++ optional alsaSupport alsa-lib ++ optional pulseaudioSupport libpulseaudio - ++ optionals pipewireSupport [ pipewire libdrm ]; + ++ optionals pipewireSupport [ pipewire libdrm ] + ++ optional withFdk fdk_aac; # Copied from the obs-linuxbrowser postUnpack = '' @@ -127,12 +154,17 @@ 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" "-DCEF_ROOT_DIR=../../cef" "-DENABLE_JACK=ON" + (lib.cmakeBool "ENABLE_QSV11" stdenv.hostPlatform.isx86_64) + (lib.cmakeBool "ENABLE_LIBFDK" withFdk) + (lib.cmakeBool "ENABLE_ALSA" alsaSupport) + (lib.cmakeBool "ENABLE_PULSEAUDIO" pulseaudioSupport) + (lib.cmakeBool "ENABLE_PIPEWIRE" pipewireSupport) ]; dontWrapGApps = true; @@ -159,7 +191,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 +202,9 @@ stdenv.mkDerivation rec { video content, efficiently ''; homepage = "https://obsproject.com"; - maintainers = with maintainers; [ jb55 MP2E materus ]; - license = licenses.gpl2Plus; + maintainers = with maintainers; [ eclairevoyant jb55 MP2E materus fpletz ]; + license = with licenses; [ gpl2Plus ] ++ optional withFdk fraunhofer-fdk; platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ]; mainProgram = "obs"; }; -} +}) diff --git a/nixpkgs/pkgs/applications/video/obs-studio/plugins/advanced-scene-switcher/default.nix b/nixpkgs/pkgs/applications/video/obs-studio/plugins/advanced-scene-switcher/default.nix index aee37b4b06d1..b776981522d0 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/plugins/advanced-scene-switcher/default.nix +++ b/nixpkgs/pkgs/applications/video/obs-studio/plugins/advanced-scene-switcher/default.nix @@ -23,13 +23,13 @@ stdenv.mkDerivation rec { pname = "advanced-scene-switcher"; - version = "1.24.0"; + version = "1.24.2"; src = fetchFromGitHub { owner = "WarmUpTill"; repo = "SceneSwitcher"; rev = version; - hash = "sha256-Xnf8Vz6I5EfiiVoG0JRd0f0IJHw1IVkTLL4Th/hWYrc="; + hash = "sha256-J5Qcs2eoKMeO1O/MCsR5wfmfbtndRaZmHrbleEZqqOo="; }; nativeBuildInputs = [ @@ -72,6 +72,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/WarmUpTill/SceneSwitcher"; license = licenses.gpl2Plus; platforms = platforms.linux; - maintainers = with maintainers; [ paveloom ]; + maintainers = with maintainers; [ ]; }; } diff --git a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-hyperion/default.nix b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-hyperion/default.nix index c92bdd9346c8..85606e05f0c1 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-hyperion/default.nix +++ b/nixpkgs/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/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-ndi/default.nix b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-ndi/default.nix index a16c8924adce..037eda100611 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-ndi/default.nix +++ b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-ndi/default.nix @@ -2,16 +2,16 @@ stdenv.mkDerivation rec { pname = "obs-ndi"; - version = "4.10.0"; + version = "4.13.0"; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake qtbase ]; buildInputs = [ obs-studio qtbase ndi ]; src = fetchFromGitHub { owner = "Palakis"; repo = "obs-ndi"; - rev = "dummy-tag-${version}"; - sha256 = "sha256-eQ/hQ2AnwyBNOotqlUZq07m4FXoeir2f7cTVq594obc="; + rev = version; + sha256 = "sha256-ugAMSTXbbIZ61oWvoggVJ5kZEgp/waEcWt89AISrSdE="; }; patches = [ @@ -19,8 +19,8 @@ stdenv.mkDerivation rec { ]; postPatch = '' - # Add path (variable added in hardcode-ndi-path.patch) - sed -i -e s,@NDI@,${ndi},g src/obs-ndi.cpp + # Add path (variable added in hardcode-ndi-path.patch + sed -i -e s,@NDI@,${ndi},g src/plugin-main.cpp # Replace bundled NDI SDK with the upstream version # (This fixes soname issues) @@ -28,12 +28,7 @@ stdenv.mkDerivation rec { ln -s ${ndi}/include lib/ndi ''; - postInstall = '' - mkdir $out/lib $out/share - mv $out/obs-plugins/64bit $out/lib/obs-plugins - rm -rf $out/obs-plugins - mv $out/data $out/share/obs - ''; + cmakeFlags = [ "-DENABLE_QT=ON" ]; dontWrapQtApps = true; diff --git a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-ndi/hardcode-ndi-path.patch b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-ndi/hardcode-ndi-path.patch index 03b54473bb8b..b675c10a0346 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-ndi/hardcode-ndi-path.patch +++ b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-ndi/hardcode-ndi-path.patch @@ -1,19 +1,16 @@ -diff --git a/src/obs-ndi.cpp b/src/obs-ndi.cpp -index 1a8aeb3..9a36ea9 100644 ---- a/src/obs-ndi.cpp -+++ b/src/obs-ndi.cpp -@@ -132,13 +132,7 @@ const NDIlib_v5 *load_ndilib() - const char *redistFolder = std::getenv(NDILIB_REDIST_FOLDER); - if (redistFolder) - libraryLocations.push_back(redistFolder); +diff --git a/src/plugin-main.cpp b/src/plugin-main.cpp +index 0d94add..617af73 100644 +--- a/src/plugin-main.cpp ++++ b/src/plugin-main.cpp +@@ -244,10 +244,7 @@ const NDIlib_v4 *load_ndilib() + if (!path.isEmpty()) { + locations << path; + } -#if defined(__linux__) || defined(__APPLE__) -- libraryLocations.push_back("/usr/lib"); -- libraryLocations.push_back("/usr/lib64"); -- libraryLocations.push_back("/usr/lib/x86_64-linux-gnu"); -- libraryLocations.push_back("/usr/local/lib"); -- libraryLocations.push_back("/usr/local/lib64"); +- locations << "/usr/lib"; +- locations << "/usr/local/lib"; -#endif -+ libraryLocations.push_back("@NDI@/lib"); - - for (std::string path : libraryLocations) { - blog(LOG_DEBUG, "[load_ndilib] Trying library path: '%s'", path.c_str()); ++ locations << "@NDI@/lib"; + for (QString location : locations) { + path = QDir::cleanPath( + QDir(location).absoluteFilePath(NDILIB_LIBRARY_NAME)); diff --git a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-pipewire-audio-capture.nix b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-pipewire-audio-capture.nix index 622ba7d66e28..f2aef5972dc1 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-pipewire-audio-capture.nix +++ b/nixpkgs/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/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-teleport/default.nix b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-teleport/default.nix index c7ee1d4f2598..3c0c662b7618 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-teleport/default.nix +++ b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-teleport/default.nix @@ -47,7 +47,7 @@ buildGoModule rec { meta = { description = "An OBS Studio plugin for an open NDI-like replacement"; homepage = "https://github.com/fzwoch/obs-teleport"; - maintainers = [ lib.maintainers.paveloom ]; + maintainers = [ ]; license = lib.licenses.gpl2Plus; platforms = obs-studio.meta.platforms; }; diff --git a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-tuna/default.nix b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-tuna/default.nix index 8fd1b5f96f83..798b23b2c8d7 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-tuna/default.nix +++ b/nixpkgs/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 = '' |