about summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2022-11-11 06:14:16 +0100
committerFranz Pletz <fpletz@fnordicwalking.de>2022-11-11 07:01:47 +0100
commit85d67fa055f40b242fd38c3c1fa91817bd8429f7 (patch)
tree69afd643145092462a74ff815f0e61249cd0872a /pkgs/applications/video
parent0e8b1375c0a33bd220a8e726d5eebedf5f6f33c7 (diff)
obs-studio-plugins.obs-ndi: 4.9.1 -> 4.10.0
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/obs-studio/plugins/default.nix2
-rw-r--r--pkgs/applications/video/obs-studio/plugins/fix-search-path.patch13
-rw-r--r--pkgs/applications/video/obs-studio/plugins/hardcode-ndi-path.patch24
-rw-r--r--pkgs/applications/video/obs-studio/plugins/obs-ndi.nix21
4 files changed, 26 insertions, 34 deletions
diff --git a/pkgs/applications/video/obs-studio/plugins/default.nix b/pkgs/applications/video/obs-studio/plugins/default.nix
index 923013d8b5278..e1816e4969504 100644
--- a/pkgs/applications/video/obs-studio/plugins/default.nix
+++ b/pkgs/applications/video/obs-studio/plugins/default.nix
@@ -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 { };
 
diff --git a/pkgs/applications/video/obs-studio/plugins/fix-search-path.patch b/pkgs/applications/video/obs-studio/plugins/fix-search-path.patch
deleted file mode 100644
index 4503447ff5dc7..0000000000000
--- a/pkgs/applications/video/obs-studio/plugins/fix-search-path.patch
+++ /dev/null
@@ -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)
diff --git a/pkgs/applications/video/obs-studio/plugins/hardcode-ndi-path.patch b/pkgs/applications/video/obs-studio/plugins/hardcode-ndi-path.patch
index caef96c381f27..03b54473bb8ba 100644
--- a/pkgs/applications/video/obs-studio/plugins/hardcode-ndi-path.patch
+++ b/pkgs/applications/video/obs-studio/plugins/hardcode-ndi-path.patch
@@ -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());
diff --git a/pkgs/applications/video/obs-studio/plugins/obs-ndi.nix b/pkgs/applications/video/obs-studio/plugins/obs-ndi.nix
index b581ea91da223..a16c8924adceb 100644
--- a/pkgs/applications/video/obs-studio/plugins/obs-ndi.nix
+++ b/pkgs/applications/video/obs-studio/plugins/obs-ndi.nix
@@ -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;