1 { lib, stdenv, requireFile, avahi, obs-studio-plugins }:
4 versionJSON = lib.importJSON ./version.json;
6 stdenv.mkDerivation rec {
8 version = versionJSON.version;
9 majorVersion = builtins.head (builtins.splitVersion version);
10 installerName = "Install_NDI_SDK_v${majorVersion}_Linux";
12 src = requireFile rec {
13 name = "${installerName}.tar.gz";
14 sha256 = versionJSON.hash;
16 In order to use NDI SDK version ${version}, you need to comply with
17 NewTek's license and download the appropriate Linux tarball from:
21 Once you have downloaded the file, please use the following command and
22 re-run the installation:
24 \$ nix-prefetch-url file://\$PWD/${name}
28 buildInputs = [ avahi ];
32 echo y | ./${installerName}.sh
33 sourceRoot="NDI SDK for Linux";
38 mv bin/x86_64-linux-gnu $out/bin
39 for i in $out/bin/*; do
40 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$i"
42 patchelf --set-rpath "${avahi}/lib:${stdenv.cc.libc}/lib" $out/bin/ndi-record
43 mv lib/x86_64-linux-gnu $out/lib
44 for i in $out/lib/*; do
45 if [ -L "$i" ]; then continue; fi
46 patchelf --set-rpath "${avahi}/lib:${stdenv.cc.libc}/lib" "$i"
48 mv include examples $out/
49 mkdir -p $out/share/doc/${pname}-${version}
50 mv licenses $out/share/doc/${pname}-${version}/licenses
51 mv logos $out/share/doc/${pname}-${version}/logos
52 mv documentation/* $out/share/doc/${pname}-${version}/
55 # Stripping breaks ndi-record.
59 inherit (obs-studio-plugins) obs-ndi;
61 passthru.updateScript = ./update.py;
64 homepage = "https://ndi.tv/sdk/";
65 description = "NDI Software Developer Kit";
66 platforms = ["x86_64-linux"];
68 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
69 license = licenses.unfree;