2021-01-27 05:24:12 +00:00
|
|
|
{ stdenv, requireFile, lib,
|
|
|
|
libcxx, libcxxabi
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "blackmagic-desktop-video";
|
2021-12-19 16:03:53 +00:00
|
|
|
version = "12.2.2";
|
2021-01-27 05:24:12 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libcxx libcxxabi
|
|
|
|
];
|
|
|
|
|
|
|
|
src = requireFile {
|
2021-12-19 16:03:53 +00:00
|
|
|
name = "Blackmagic_Desktop_Video_Linux_12.2.2.tar.gz";
|
|
|
|
url = "https://www.blackmagicdesign.com/support/";
|
|
|
|
sha256 = "8bca946bd3f002d2d404a74210c881935351e1a0d03f750559b180fdb439ef35";
|
2021-01-27 05:24:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
setSourceRoot = ''
|
2021-12-19 16:03:53 +00:00
|
|
|
tar xf Blackmagic_Desktop_Video_Linux_12.2.2/other/x86_64/desktopvideo-12.2.2a6-x86_64.tar.gz
|
|
|
|
sourceRoot=$NIX_BUILD_TOP/desktopvideo-12.2.2a6-x86_64
|
2021-01-27 05:24:12 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/{bin,share/doc,lib}
|
|
|
|
cp -r $sourceRoot/usr/share/doc/desktopvideo $out/share/doc
|
|
|
|
cp $sourceRoot/usr/lib/*.so $out/lib
|
|
|
|
ln -s ${libcxx}/lib/* ${libcxxabi}/lib/* $out/lib
|
|
|
|
cp $sourceRoot/usr/lib/blackmagic/DesktopVideo/libgcc_s.so.1 $out/lib/
|
|
|
|
cp $sourceRoot/usr/lib/blackmagic/DesktopVideo/DesktopVideoHelper $out/bin/
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
|
|
|
|
--set-rpath "$out/lib:${lib.makeLibraryPath [ libcxx libcxxabi ]}" \
|
|
|
|
$out/bin/DesktopVideoHelper
|
|
|
|
'';
|
|
|
|
|
2021-11-19 18:53:06 +00:00
|
|
|
meta = with lib; {
|
2021-01-27 05:24:12 +00:00
|
|
|
homepage = "https://www.blackmagicdesign.com/support/family/capture-and-playback";
|
|
|
|
maintainers = [ maintainers.hexchen ];
|
|
|
|
license = licenses.unfree;
|
|
|
|
description = "Supporting applications for Blackmagic Decklink. Doesn't include the desktop applications, only the helper required to make the driver work.";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|