···11+{ stdenv, requireFile, avahi }:22+33+stdenv.mkDerivation rec {44+ pname = "ndi";55+ version = "4";66+77+ src = requireFile rec {88+ name = "InstallNDISDK_v${version}_Linux.tar.gz";99+ sha256 = "1hac5npyg8nifs9ipj34pkn0zjyx8774x3i3h8znhmijx2j2982p";1010+ message = ''1111+ In order to use the NDI SDK, you need to comply with NewTek's license and1212+ download the Linux version ${version} tarball from:1313+1414+ ${meta.homepage}1515+1616+ Once you have downloaded the file, please use the following command and1717+ re-run the installation:1818+1919+ nix-prefetch-url file://\$PWD/${name}2020+ '';2121+ };2222+2323+ buildInputs = [ avahi ];2424+2525+ unpackPhase = ''2626+ unpackFile ${src}2727+ echo y | ./InstallNDISDK_v4_Linux.sh2828+ sourceRoot="NDI SDK for Linux";2929+ '';3030+3131+ installPhase = ''3232+ mkdir $out3333+ mv bin/x86_64-linux-gnu $out/bin3434+ for i in $out/bin/*; do3535+ patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$i"3636+ done3737+ patchelf --set-rpath "${avahi}/lib:${stdenv.cc.libc}/lib" $out/bin/ndi-record3838+ mv lib/x86_64-linux-gnu $out/lib3939+ for i in $out/lib/*; do4040+ if [ -L "$i" ]; then continue; fi4141+ patchelf --set-rpath "${avahi}/lib:${stdenv.cc.libc}/lib" "$i"4242+ done4343+ mv include examples $out/4444+ mkdir -p $out/share/doc/${pname}-${version}4545+ mv licenses $out/share/doc/${pname}-${version}/licenses4646+ mv logos $out/share/doc/${pname}-${version}/logos4747+ mv documentation/* $out/share/doc/${pname}-${version}/4848+ '';4949+5050+ # Stripping breaks ndi-record.5151+ dontStrip = true;5252+5353+ meta = with stdenv.lib; {5454+ homepage = "https://ndi.tv/sdk/";5555+ description = "NDI Software Developer Kit";5656+ platforms = ["x86_64-linux"];5757+ hydraPlatforms = [];5858+ license = licenses.unfree;5959+ };6060+}