obs-studio-plugins.distroav: init at 6.0.0

This Version has major & large code changes.Starting v6 the plugin has
been re-branded DistroAV from OBS-NDI.
https://github.com/DistroAV/DistroAV/releases/tag/6.0.0

"obs-studio-plugins.distroav: correct file formatting"

"obs-studio-plugins.distroav: fixed fmt issue by adding tag"

obs-studio-plugins.distroav: run nixfmt on the file to fix formatting

osb-studio-plugins.distroav: changed lib reference to ndi-6

obs-studio-plugins.distroav: fix ndi-6 reference
This commit is contained in:
globule
2025-01-05 18:35:08 +01:00
parent eba050bcee
commit 24ff7ae790
3 changed files with 81 additions and 0 deletions
@@ -10,6 +10,8 @@
droidcam-obs = callPackage ./droidcam-obs { };
distroav = qt6Packages.callPackage ./distroav { };
input-overlay = qt6Packages.callPackage ./input-overlay.nix { };
looking-glass-obs = callPackage ./looking-glass-obs.nix { };
@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchFromGitHub,
obs-studio,
cmake,
qtbase,
ndi-6,
curl,
}:
stdenv.mkDerivation rec {
pname = "distroav";
version = "6.0.0";
nativeBuildInputs = [
cmake
qtbase
];
buildInputs = [
obs-studio
qtbase
ndi-6
curl
];
src = fetchFromGitHub {
owner = "DistroAV";
repo = "DistroAV";
tag = version;
hash = "sha256-pr/5XCLo5fzergIQrYFC9o9K+KuP4leDk5/oRe5ct9Q=";
};
# Modify plugin-main.cpp file to fix ndi libs path
patches = [ ./hardcode-ndi-path.patch ];
postPatch = ''
# Add path (variable added in hardcode-ndi-path.patch
substituteInPlace src/plugin-main.cpp --replace-fail "@NDI@" "${ndi-6}"
# Replace bundled NDI SDK with the upstream version
# (This fixes soname issues)
rm -rf lib/ndi
ln -s ${ndi-6}/include lib/ndi
'';
cmakeFlags = [ "-DENABLE_QT=ON" ];
env.NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
dontWrapQtApps = true;
meta = {
description = "Network A/V plugin for OBS Studio (formerly obs-ndi)";
homepage = "https://github.com/DistroAV/DistroAV";
license = with lib.licenses; [ gpl2 ];
maintainers = with lib.maintainers; [ globule655 ];
platforms = lib.platforms.linux;
};
}
@@ -0,0 +1,18 @@
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
@@ -369,14 +369,7 @@ const NDIlib_v5 *load_ndilib()
if (!temp_path.isEmpty()) {
locations << temp_path;
}
-#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS)
- // Linux, MacOS
- // https://github.com/DistroAV/DistroAV/blob/master/lib/ndi/NDI%20SDK%20Documentation.pdf
- // "6.1 LOCATING THE LIBRARY
- // ... the redistributable on MacOS is installed within `/usr/local/lib` ..."
- locations << "/usr/lib";
- locations << "/usr/local/lib";
-#endif
+ locations << "@NDI@/lib";
auto lib_path = QString();