4 blackmagic-desktop-video,
7 stdenv.mkDerivation (finalAttrs: {
10 # the download is a horrible curl mess. we reuse it between the kernel module
11 # and desktop service, since the version of the two have to match anyways.
12 # See pkgs/by-name/bl/blackmagic-desktop-video/package.nix for more.
13 inherit (blackmagic-desktop-video) src version;
15 KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
16 INSTALL_MOD_PATH = placeholder "out";
18 nativeBuildInputs = kernel.moduleBuildDependencies;
22 arch = stdenv.hostPlatform.uname.processor;
25 tar xf Blackmagic_Desktop_Video_Linux_${lib.head (lib.splitString "a" finalAttrs.version)}/other/${arch}/desktopvideo-${finalAttrs.version}-${arch}.tar.gz
26 moduleRoot=$NIX_BUILD_TOP/desktopvideo-${finalAttrs.version}-${stdenv.hostPlatform.uname.processor}/usr/src
27 sourceRoot=$moduleRoot
32 make -C $moduleRoot/blackmagic-${finalAttrs.version} -j$NIX_BUILD_CORES
33 make -C $moduleRoot/blackmagic-io-${finalAttrs.version} -j$NIX_BUILD_CORES
39 make -C $KERNELDIR M=$moduleRoot/blackmagic-${finalAttrs.version} modules_install
40 make -C $KERNELDIR M=$moduleRoot/blackmagic-io-${finalAttrs.version} modules_install
45 homepage = "https://www.blackmagicdesign.com/support/family/capture-and-playback";
46 maintainers = [ maintainers.naxdy ];
47 license = licenses.unfree;
48 description = "Kernel module for the Blackmagic Design Decklink cards";
49 sourceProvenance = with lib.sourceTypes; [ binaryFirmware ];
50 platforms = platforms.linux;