Skip to content

Commit

Permalink
obs-studio-plugins.obs-ndi: use NDI SDK headers directly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lukegb committed Aug 23, 2022
1 parent 87b25db commit c195e88
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkgs/applications/video/obs-studio/plugins/obs-ndi.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c195e88

Please sign in to comment.