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-01-28 21:10:46 +00:00
|
|
|
fullVersion = "4.6.0";
|
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-01-28 21:10:46 +00:00
|
|
|
sha256 = "19jrj2v7x1amdpc9pdq3042vm2l3szwqbzb83lirgbc24s2q043m";
|
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 = [];
|
|
|
|
license = licenses.unfree;
|
|
|
|
};
|
|
|
|
}
|