2021-11-19 18:53:06 +00:00
|
|
|
{ stdenv, requireFile, fetchpatch, kernel, lib }:
|
2021-01-27 05:24:12 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "decklink";
|
2022-06-22 17:24:40 +00:00
|
|
|
version = "12.3";
|
2021-01-27 05:24:12 +00:00
|
|
|
|
|
|
|
src = requireFile {
|
2022-06-22 17:24:40 +00:00
|
|
|
name = "Blackmagic_Desktop_Video_Linux_12.3.tar.gz";
|
2021-12-19 16:03:53 +00:00
|
|
|
url = "https://www.blackmagicdesign.com/support/";
|
2022-06-22 17:24:40 +00:00
|
|
|
sha256 = "1c6m3wb3asbkx45ap523zbsiimrxpsrv3wl1ykxv3njd73zziwyb";
|
2021-01-27 05:24:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
|
|
|
INSTALL_MOD_PATH = placeholder "out";
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
setSourceRoot = ''
|
2022-06-22 17:24:40 +00:00
|
|
|
tar xf Blackmagic_Desktop_Video_Linux_12.3/other/x86_64/desktopvideo-12.3a10-x86_64.tar.gz
|
|
|
|
sourceRoot=$NIX_BUILD_TOP/desktopvideo-12.3a10-x86_64/usr/src
|
2021-01-27 05:24:12 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
2022-06-22 17:24:40 +00:00
|
|
|
make -C $sourceRoot/blackmagic-12.3a10 -j$NIX_BUILD_CORES
|
|
|
|
make -C $sourceRoot/blackmagic-io-12.3a10 -j$NIX_BUILD_CORES
|
2021-01-27 05:24:12 +00:00
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2022-06-22 17:24:40 +00:00
|
|
|
make -C $KERNELDIR M=$sourceRoot/blackmagic-12.3a10 modules_install
|
|
|
|
make -C $KERNELDIR M=$sourceRoot/blackmagic-io-12.3a10 modules_install
|
2021-01-27 05:24:12 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
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 = "Kernel module for the Blackmagic Design Decklink cards";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|