From 3141ba7b5033fb6b5f6ff13e2d30e7d64fa14beb Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Sun, 4 Apr 2021 22:22:21 +0100 Subject: [PATCH] obs-multi-rtmp: init at 0.2.6 --- .../video/obs-studio/obs-multi-rtmp.nix | 43 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/applications/video/obs-studio/obs-multi-rtmp.nix diff --git a/pkgs/applications/video/obs-studio/obs-multi-rtmp.nix b/pkgs/applications/video/obs-studio/obs-multi-rtmp.nix new file mode 100644 index 000000000000..f716d93a3603 --- /dev/null +++ b/pkgs/applications/video/obs-studio/obs-multi-rtmp.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, fetchFromGitHub, obs-studio, cmake, qtbase }: + +stdenv.mkDerivation rec { + pname = "obs-multi-rtmp"; + version = "0.2.6"; + + src = fetchFromGitHub { + owner = "sorayuki"; + repo = "obs-multi-rtmp"; + rev = version; + sha256 = "sha256-SMcVL54HwFIc7/wejEol2XiZhlZCMVCwHHtIKJ/CoYY="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ obs-studio qtbase ]; + + cmakeFlags = [ + "-DLIBOBS_INCLUDE_DIR=${obs-studio}/include/obs" + ]; + + dontWrapQtApps = true; + + # obs-studio expects the shared object to be located in bin/32bit or bin/64bit + # https://github.com/obsproject/obs-studio/blob/d60c736cb0ec0491013293c8a483d3a6573165cb/libobs/obs-nix.c#L48 + postInstall = let + pluginPath = { + i686-linux = "bin/32bit"; + x86_64-linux = "bin/64bit"; + }.${stdenv.targetPlatform.system} or (throw "Unsupported system: ${stdenv.targetPlatform.system}"); + in '' + mkdir -p $out/share/obs/obs-plugins/obs-multi-rtmp/${pluginPath} + ln -s $out/lib/obs-plugins/obs-multi-rtmp.so $out/share/obs/obs-plugins/obs-multi-rtmp/${pluginPath} + ''; + + meta = with lib; { + homepage = "https://github.com/sorayuki/obs-multi-rtmp/"; + changelog = "https://github.com/sorayuki/obs-multi-rtmp/releases/tag/${version}"; + description = "Multi-site simultaneous broadcast plugin for OBS Studio"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ jk ]; + platforms = [ "x86_64-linux" "i686-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 362511394123..7f5dfc39dc92 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24766,6 +24766,8 @@ in obs-move-transition = callPackage ../applications/video/obs-studio/obs-move-transition.nix { }; + obs-multi-rtmp = libsForQt5.callPackage ../applications/video/obs-studio/obs-multi-rtmp.nix { }; + obs-v4l2sink = libsForQt5.callPackage ../applications/video/obs-studio/v4l2sink.nix { }; obs-ndi = libsForQt5.callPackage ../applications/video/obs-studio/obs-ndi.nix { };