about summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2022-07-15 17:39:26 +0100
committerLuke Granger-Brown <git@lukegb.com>2022-08-23 09:19:04 +0100
commitc195e88007bc9fe95c254b3165e5d61952a621f0 (patch)
treee01180997e9b1c70af88f48b6d8b76a74b6ab643 /pkgs/applications/video
parent87b25db2ac940756e6c8f5208ad8f1dad6085533 (diff)
obs-studio-plugins.obs-ndi: use NDI SDK headers directly
obs-ndi bundles the NDI SDK headers to avoid a more complicated build
setup, but this plays against us here because the soversion for the v5
NDI SDK is "5" even though as far as I know it's fully ABI compatible
with the v4 headers in use here.

Work around the v4/v5 incompatibility here by using the upstream SDK
headers instead.
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/obs-studio/plugins/obs-ndi.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/applications/video/obs-studio/plugins/obs-ndi.nix b/pkgs/applications/video/obs-studio/plugins/obs-ndi.nix
index 76d4ec85a0146..d73c05fdead11 100644
--- a/pkgs/applications/video/obs-studio/plugins/obs-ndi.nix
+++ b/pkgs/applications/video/obs-studio/plugins/obs-ndi.nix
@@ -16,7 +16,15 @@ stdenv.mkDerivation rec {
 
   patches = [ ./fix-search-path.patch ./hardcode-ndi-path.patch ];
 
-  postPatch = "sed -i -e s,@NDI@,${ndi},g src/obs-ndi.cpp";
+  postPatch = ''
+    # Add path (variable added in hardcode-ndi-path.patch)
+    sed -i -e s,@NDI@,${ndi},g src/obs-ndi.cpp
+
+    # Replace bundled NDI SDK with the upstream version
+    # (This fixes soname issues)
+    rm -rf lib/ndi
+    ln -s ${ndi}/include lib/ndi
+  '';
 
   cmakeFlags = [
     "-DLIBOBS_INCLUDE_DIR=${obs-studio}/include/obs"