2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, requireFile, avahi }:
|
2019-11-18 09:15:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ndi";
|
2021-08-05 16:13:13 +00:00
|
|
|
fullVersion = "4.6.2";
|
2020-03-13 11:37:15 +00:00
|
|
|
version = builtins.head (builtins.splitVersion fullVersion);
|
2019-11-18 09:15:52 +00:00
|
|
|
|
|
|
|
src = requireFile rec {
|
|
|
|
name = "InstallNDISDK_v${version}_Linux.tar.gz";
|
2021-08-05 16:13:13 +00:00
|
|
|
sha256 = "181ypfj1bl0kljzrfr6037i14ykg2y4plkzdhym6m3z7kcrnm1fl";
|
2019-11-18 09:15:52 +00:00
|
|
|
message = ''
|
2020-03-13 11:37:15 +00:00
|
|
|
In order to use NDI SDK version ${fullVersion}, you need to comply with
|
|
|
|
NewTek's license and download the appropriate Linux tarball from:
|
2019-11-18 09:15:52 +00:00
|
|
|
|
2020-03-13 11:37:15 +00:00
|
|
|
${meta.homepage}
|
2019-11-18 09:15:52 +00:00
|
|
|
|
|
|
|
Once you have downloaded the file, please use the following command and
|
|
|
|
re-run the installation:
|
|
|
|
|
2020-03-13 11:37:15 +00:00
|
|
|
\$ nix-prefetch-url file://\$PWD/${name}
|
2019-11-18 09:15:52 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ avahi ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
unpackFile ${src}
|
|
|
|
echo y | ./InstallNDISDK_v4_Linux.sh
|
|
|
|
sourceRoot="NDI SDK for Linux";
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
mv bin/x86_64-linux-gnu $out/bin
|
|
|
|
for i in $out/bin/*; do
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$i"
|
|
|
|
done
|
|
|
|
patchelf --set-rpath "${avahi}/lib:${stdenv.cc.libc}/lib" $out/bin/ndi-record
|
|
|
|
mv lib/x86_64-linux-gnu $out/lib
|
|
|
|
for i in $out/lib/*; do
|
|
|
|
if [ -L "$i" ]; then continue; fi
|
|
|
|
patchelf --set-rpath "${avahi}/lib:${stdenv.cc.libc}/lib" "$i"
|
|
|
|
done
|
|
|
|
mv include examples $out/
|
|
|
|
mkdir -p $out/share/doc/${pname}-${version}
|
|
|
|
mv licenses $out/share/doc/${pname}-${version}/licenses
|
|
|
|
mv logos $out/share/doc/${pname}-${version}/logos
|
|
|
|
mv documentation/* $out/share/doc/${pname}-${version}/
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Stripping breaks ndi-record.
|
|
|
|
dontStrip = true;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-11-18 09:15:52 +00:00
|
|
|
homepage = "https://ndi.tv/sdk/";
|
|
|
|
description = "NDI Software Developer Kit";
|
|
|
|
platforms = ["x86_64-linux"];
|
|
|
|
hydraPlatforms = [];
|
2022-06-16 22:11:43 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2019-11-18 09:15:52 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
};
|
|
|
|
}
|