2019-11-13 13:17:32 +00:00
|
|
|
# We don't have a wrapper which can supply obs-studio plugins so you have to
|
|
|
|
# somewhat manually install this:
|
|
|
|
|
|
|
|
# nix-env -f "<nixpkgs>" -iA obs-ndi
|
2019-11-18 09:15:52 +00:00
|
|
|
# mkdir -p ~/.config/obs-studio/plugins/bin
|
|
|
|
# ln -s ~/.nix-profile/lib/obs-plugins/obs-ndi.so ~/.config/obs-studio/plugins/bin/
|
2019-11-13 13:17:32 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, obs-studio, cmake, qtbase, ndi }:
|
2019-11-13 13:17:32 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "obs-ndi";
|
2020-10-06 01:09:12 +00:00
|
|
|
version = "4.9.1";
|
2019-11-13 13:17:32 +00:00
|
|
|
|
2019-11-18 09:15:52 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-09-07 16:07:31 +00:00
|
|
|
buildInputs = [ obs-studio qtbase ndi ];
|
2019-11-18 09:15:52 +00:00
|
|
|
|
2019-11-13 13:17:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Palakis";
|
|
|
|
repo = "obs-ndi";
|
|
|
|
rev = version;
|
2020-10-06 01:09:12 +00:00
|
|
|
sha256 = "1y3xdqp55jayhg4sinwiwpk194zc4f4jf0abz647x2fprsk9jz7s";
|
2019-11-13 13:17:32 +00:00
|
|
|
};
|
|
|
|
|
2019-11-18 09:15:52 +00:00
|
|
|
patches = [ ./fix-search-path.patch ./hardcode-ndi-path.patch ];
|
2019-11-13 13:17:32 +00:00
|
|
|
|
2019-11-18 09:15:52 +00:00
|
|
|
postPatch = "sed -i -e s,@NDI@,${ndi},g src/obs-ndi.cpp";
|
2019-11-13 13:17:32 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DLIBOBS_INCLUDE_DIR=${obs-studio}/include/obs"
|
|
|
|
"-DLIBOBS_LIB=${obs-studio}/lib"
|
|
|
|
"-DCMAKE_CXX_FLAGS=-I${obs-studio.src}/UI/obs-frontend-api"
|
|
|
|
];
|
|
|
|
|
2021-01-12 11:50:23 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-11-13 13:17:32 +00:00
|
|
|
description = "Network A/V plugin for OBS Studio";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/Palakis/obs-ndi";
|
2020-10-06 01:09:12 +00:00
|
|
|
maintainers = with maintainers; [ peti jshcmpbll ];
|
2019-11-13 13:17:32 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|