Version V1.3.0.4390 of mwprocapture (the Linux driver for the Magewell Pro Capture family) FTBFS when building against Linux 6.12 or newer. Magewell offer a revised driver. This pull request updates the driver version to 1.3.4418 to address this issue. *Note the version numbering has changed in this release*. Vendor change log: - Fix the compatibility issue of the kernel driver for RHEL9.4. - Add the preset function for contrast/brightness/saturation/hue values. - Support the installation of drivers in a Secure Boot environment. Tested using a Magewell Pro Capture Dual HDMI (11080) and Magewell Pro Capture Quad HDMI (11100). This fixes #403297
77 lines
1.8 KiB
Nix
77 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
kernel,
|
|
alsa-lib,
|
|
}:
|
|
|
|
let
|
|
bits = if stdenv.hostPlatform.is64bit then "64" else "32";
|
|
|
|
libpath = lib.makeLibraryPath [
|
|
stdenv.cc.cc
|
|
stdenv.cc.libc
|
|
alsa-lib
|
|
];
|
|
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "mwprocapture";
|
|
subVersion = "1.3.4418";
|
|
version = "${subVersion}-${kernel.version}";
|
|
|
|
src = fetchurl {
|
|
url = "https://www.magewell.com/files/drivers/ProCaptureForLinux_${subVersion}.tar.gz";
|
|
sha256 = "sha256-ZUqJkARhaMo9aZOtUMEdiHEbEq10lJO6MkGjEDnfx1g=";
|
|
};
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
preConfigure = ''
|
|
cd ./src
|
|
export INSTALL_MOD_PATH="$out"
|
|
'';
|
|
|
|
hardeningDisable = [
|
|
"pic"
|
|
"format"
|
|
];
|
|
|
|
makeFlags = [
|
|
"KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-fallthrough";
|
|
|
|
postInstall = ''
|
|
cd ../
|
|
mkdir -p $out/bin
|
|
cp bin/mwcap-control_${bits} $out/bin/mwcap-control
|
|
cp bin/mwcap-info_${bits} $out/bin/mwcap-info
|
|
mkdir -p $out/lib/udev/rules.d
|
|
# source has a filename typo
|
|
cp scripts/10-procatpure-event-dev.rules $out/lib/udev/rules.d/10-procapture-event-dev.rules
|
|
cp -r src/res $out
|
|
|
|
patchelf \
|
|
--set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
|
|
--set-rpath "${libpath}" \
|
|
"$out"/bin/mwcap-control
|
|
|
|
patchelf \
|
|
--set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
|
|
--set-rpath "${libpath}" \
|
|
"$out"/bin/mwcap-info
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://www.magewell.com/";
|
|
description = "Linux driver for the Magewell Pro Capture family";
|
|
license = lib.licenses.unfreeRedistributable;
|
|
maintainers = with lib.maintainers; [ flexiondotorg ];
|
|
platforms = lib.platforms.linux;
|
|
broken = lib.versionAtLeast kernel.version "6.15";
|
|
};
|
|
}
|