2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, obs-studio, cmake, qtbase, ndi }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "obs-ndi";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "4.10.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-09-25 04:45:31 +00:00
|
|
|
buildInputs = [ obs-studio qtbase ndi ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Palakis";
|
|
|
|
repo = "obs-ndi";
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "dummy-tag-${version}";
|
|
|
|
sha256 = "sha256-eQ/hQ2AnwyBNOotqlUZq07m4FXoeir2f7cTVq594obc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
patches = [
|
|
|
|
./hardcode-ndi-path.patch
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
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
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
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
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Network A/V plugin for OBS Studio";
|
|
|
|
homepage = "https://github.com/Palakis/obs-ndi";
|
|
|
|
license = licenses.gpl2;
|
2022-09-09 14:08:57 +00:00
|
|
|
maintainers = with maintainers; [ jshcmpbll ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
hydraPlatforms = ndi.meta.hydraPlatforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|