obs-studio: add build for obs-ndi plugin

Note that the plugin won't do anything without the NDI library packaged, too.
I'll add that one ASAP.
This commit is contained in:
Peter Simons 2019-11-13 14:17:32 +01:00
parent 854f51b2fe
commit 11e98079ba
3 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,13 @@
diff --git a/external/FindLibObs.cmake b/external/FindLibObs.cmake
index ab0a3de..19c63ee 100644
--- a/external/FindLibObs.cmake
+++ b/external/FindLibObs.cmake
@@ -95,7 +95,7 @@ if(LIBOBS_FOUND)
set(LIBOBS_INCLUDE_DIRS ${LIBOBS_INCLUDE_DIR} ${W32_PTHREADS_INCLUDE_DIR})
set(LIBOBS_LIBRARIES ${LIBOBS_LIB} ${W32_PTHREADS_LIB})
- include(${LIBOBS_INCLUDE_DIR}/../cmake/external/ObsPluginHelpers.cmake)
+ include(external/ObsPluginHelpers.cmake)
# allows external plugins to easily use/share common dependencies that are often included with libobs (such as FFmpeg)
if(NOT DEFINED INCLUDED_LIBOBS_CMAKE_MODULES)

View file

@ -0,0 +1,39 @@
# We don't have a wrapper which can supply obs-studio plugins so you have to
# somewhat manually install this:
# nix-env -f "<nixpkgs>" -iA obs-ndi
# mkdir -p ~/.config/obs-studio/plugins
# ln -s ~/.nix-profile/share/obs/obs-plugins/obs-ndi ~/.config/obs-studio/plugins/
{ stdenv, fetchFromGitHub, obs-studio, cmake, qt5 }:
stdenv.mkDerivation rec {
pname = "obs-ndi";
version = "4.7.1";
src = fetchFromGitHub {
owner = "Palakis";
repo = "obs-ndi";
rev = version;
sha256 = "040fkbf3f3qgqcrd3072y3zrjb4fwga8zr10jym744xd7bgyylqh";
};
patches = [ ./fix-search-path.patch ];
nativeBuildInputs = [ cmake ];
buildInputs = [ obs-studio qt5.qtbase ];
cmakeFlags = [
"-DLIBOBS_INCLUDE_DIR=${obs-studio}/include/obs"
"-DLIBOBS_LIB=${obs-studio}/lib"
"-DCMAKE_CXX_FLAGS=-I${obs-studio.src}/UI/obs-frontend-api"
];
meta = with stdenv.lib; {
description = "Network A/V plugin for OBS Studio";
homepage = https://github.com/Palakis/obs-ndi;
maintainers = with maintainers; [ peti ];
license = licenses.gpl2;
platforms = with platforms; linux;
};
}

View file

@ -20332,6 +20332,8 @@ in
obs-wlrobs = callPackage ../applications/video/obs-studio/wlrobs.nix { };
obs-ndi = callPackage ../applications/video/obs-studio/obs-ndi.nix { };
octoprint = callPackage ../applications/misc/octoprint { };
octoprint-plugins = callPackage ../applications/misc/octoprint/plugins.nix { };