obs-studio: package the missing ndi library to make the obs-ndi plug-in actually work
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
diff --git a/src/obs-ndi.cpp b/src/obs-ndi.cpp
|
||||
index 493831c..7b0f8db 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));
|
||||
-#if defined(__linux__) || defined(__APPLE__)
|
||||
- locations << "/usr/lib";
|
||||
- locations << "/usr/local/lib";
|
||||
-#endif
|
||||
+ locations << "@NDI@/lib";
|
||||
|
||||
for (QString path : locations) {
|
||||
blog(LOG_INFO, "Trying '%s'", path.toUtf8().constData());
|
||||
@@ -2,15 +2,18 @@
|
||||
# somewhat manually install this:
|
||||
|
||||
# nix-env -f "<nixpkgs>" -iA obs-ndi
|
||||
# mkdir -p ~/.config/obs-studio/plugins
|
||||
# ln -s ~/.nix-profile/share/obs/obs-plugins/obs-ndi ~/.config/obs-studio/plugins/
|
||||
# mkdir -p ~/.config/obs-studio/plugins/bin
|
||||
# ln -s ~/.nix-profile/lib/obs-plugins/obs-ndi.so ~/.config/obs-studio/plugins/bin/
|
||||
|
||||
{ stdenv, fetchFromGitHub, obs-studio, cmake, qt5 }:
|
||||
{ stdenv, fetchFromGitHub, obs-studio, cmake, qt5, ndi }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "obs-ndi";
|
||||
version = "4.7.1";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ obs-studio qt5.qtbase ndi ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Palakis";
|
||||
repo = "obs-ndi";
|
||||
@@ -18,10 +21,9 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "040fkbf3f3qgqcrd3072y3zrjb4fwga8zr10jym744xd7bgyylqh";
|
||||
};
|
||||
|
||||
patches = [ ./fix-search-path.patch ];
|
||||
patches = [ ./fix-search-path.patch ./hardcode-ndi-path.patch ];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ obs-studio qt5.qtbase ];
|
||||
postPatch = "sed -i -e s,@NDI@,${ndi},g src/obs-ndi.cpp";
|
||||
|
||||
cmakeFlags = [
|
||||
"-DLIBOBS_INCLUDE_DIR=${obs-studio}/include/obs"
|
||||
|
||||
Reference in New Issue
Block a user