obs-studio-plugins.obs-ndi: 4.9.1 -> 4.10.0

This commit is contained in:
Franz Pletz
2022-11-11 07:01:47 +01:00
parent 0e8b1375c0
commit 85d67fa055
4 changed files with 26 additions and 34 deletions
@@ -18,7 +18,7 @@
obs-multi-rtmp = qt6Packages.callPackage ./obs-multi-rtmp { };
obs-ndi = libsForQt5.callPackage ./obs-ndi.nix { };
obs-ndi = qt6Packages.callPackage ./obs-ndi.nix { };
obs-nvfbc = callPackage ./obs-nvfbc.nix { };
@@ -1,13 +0,0 @@
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)
@@ -1,17 +1,19 @@
diff --git a/src/obs-ndi.cpp b/src/obs-ndi.cpp
index 493831c..7b0f8db 100644
index 1a8aeb3..9a36ea9 100644
--- a/src/obs-ndi.cpp
+++ b/src/obs-ndi.cpp
@@ -197,11 +197,7 @@ const char* obs_module_description()
const NDIlib_v4* load_ndilib()
{
QStringList locations;
- locations << QString(qgetenv(NDILIB_REDIST_FOLDER));
@@ -132,13 +132,7 @@ const NDIlib_v5 *load_ndilib()
const char *redistFolder = std::getenv(NDILIB_REDIST_FOLDER);
if (redistFolder)
libraryLocations.push_back(redistFolder);
-#if defined(__linux__) || defined(__APPLE__)
- locations << "/usr/lib";
- locations << "/usr/local/lib";
- 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");
-#endif
+ locations << "@NDI@/lib";
+ libraryLocations.push_back("@NDI@/lib");
for (QString path : locations) {
blog(LOG_INFO, "Trying '%s'", path.toUtf8().constData());
for (std::string path : libraryLocations) {
blog(LOG_DEBUG, "[load_ndilib] Trying library path: '%s'", path.c_str());
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
pname = "obs-ndi";
version = "4.9.1";
version = "4.10.0";
nativeBuildInputs = [ cmake ];
buildInputs = [ obs-studio qtbase ndi ];
@@ -10,11 +10,13 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "Palakis";
repo = "obs-ndi";
rev = version;
sha256 = "1y3xdqp55jayhg4sinwiwpk194zc4f4jf0abz647x2fprsk9jz7s";
rev = "dummy-tag-${version}";
sha256 = "sha256-eQ/hQ2AnwyBNOotqlUZq07m4FXoeir2f7cTVq594obc=";
};
patches = [ ./fix-search-path.patch ./hardcode-ndi-path.patch ];
patches = [
./hardcode-ndi-path.patch
];
postPatch = ''
# Add path (variable added in hardcode-ndi-path.patch)
@@ -26,11 +28,12 @@ stdenv.mkDerivation rec {
ln -s ${ndi}/include lib/ndi
'';
cmakeFlags = [
"-DLIBOBS_INCLUDE_DIR=${obs-studio}/include/obs"
"-DLIBOBS_LIB=${obs-studio}/lib"
"-DCMAKE_CXX_FLAGS=-I${obs-studio.src}/UI/obs-frontend-api"
];
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
'';
dontWrapQtApps = true;