mwprocapture: init at 1.2.3269 (#22160)
This commit is contained in:
parent
78abfe951b
commit
5e0b978eff
61
nixos/modules/hardware/video/capture/mwprocapture.nix
Normal file
61
nixos/modules/hardware/video/capture/mwprocapture.nix
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.hardware.mwProCapture;
|
||||||
|
|
||||||
|
kernelPackages = config.boot.kernelPackages;
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options.hardware.mwProCapture.enable = mkEnableOption "Magewell Pro Capture family kernel module";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
assertions = singleton {
|
||||||
|
assertion = versionAtLeast kernelPackages.kernel.version "3.2";
|
||||||
|
message = "Magewell Pro Capture family module is not supported for kernels older than 3.2";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.kernelModules = [ "ProCapture" ];
|
||||||
|
|
||||||
|
environment.systemPackages = [ kernelPackages.mwprocapture ];
|
||||||
|
|
||||||
|
boot.extraModulePackages = [ kernelPackages.mwprocapture ];
|
||||||
|
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
# Set the png picture to be displayed when no input signal is detected.
|
||||||
|
options ProCapture nosignal_file=${kernelPackages.mwprocapture}/res/NoSignal.png
|
||||||
|
|
||||||
|
# Set the png picture to be displayed when an unsupported input signal is detected.
|
||||||
|
options ProCapture unsupported_file=${kernelPackages.mwprocapture}/res/Unsupported.png
|
||||||
|
|
||||||
|
# Set the png picture to be displayed when an loking input signal is detected.
|
||||||
|
options ProCapture locking_file=${kernelPackages.mwprocapture}/res/Locking.png
|
||||||
|
|
||||||
|
# Message signaled interrupts switch
|
||||||
|
#options ProCapture disable_msi=0
|
||||||
|
|
||||||
|
# Set the debug level
|
||||||
|
#options ProCapture debug_level=0
|
||||||
|
|
||||||
|
# Force init switch eeprom
|
||||||
|
#options ProCapture init_switch_eeprom=0
|
||||||
|
|
||||||
|
# Min frame interval for VIDIOC_ENUM_FRAMEINTERVALS (default: 166666(100ns))
|
||||||
|
#options ProCapture enum_frameinterval_min=166666
|
||||||
|
|
||||||
|
# VIDIOC_ENUM_FRAMESIZES type (1: DISCRETE; 2: STEPWISE; otherwise: CONTINUOUS )
|
||||||
|
#options ProCapture enum_framesizes_type=0
|
||||||
|
|
||||||
|
# Parameters for internal usage
|
||||||
|
#options ProCapture internal_params=""
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -41,6 +41,7 @@
|
|||||||
./hardware/video/amdgpu.nix
|
./hardware/video/amdgpu.nix
|
||||||
./hardware/video/amdgpu-pro.nix
|
./hardware/video/amdgpu-pro.nix
|
||||||
./hardware/video/ati.nix
|
./hardware/video/ati.nix
|
||||||
|
./hardware/video/capture/mwprocapture.nix
|
||||||
./hardware/video/bumblebee.nix
|
./hardware/video/bumblebee.nix
|
||||||
./hardware/video/displaylink.nix
|
./hardware/video/displaylink.nix
|
||||||
./hardware/video/nvidia.nix
|
./hardware/video/nvidia.nix
|
||||||
|
66
pkgs/os-specific/linux/mwprocapture/default.nix
Normal file
66
pkgs/os-specific/linux/mwprocapture/default.nix
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
{ stdenv, fetchurl, kernel, alsaLib }:
|
||||||
|
|
||||||
|
# The Magewell Pro Capture drivers are not supported for kernels older than 3.2
|
||||||
|
assert stdenv.lib.versionAtLeast kernel.version "3.2.0";
|
||||||
|
|
||||||
|
# this package currently only supports x86 and x86_64, as I have no ARM device to test on
|
||||||
|
assert (stdenv.system == "x86_64-linux") || (stdenv.system == "i686-linux");
|
||||||
|
|
||||||
|
let
|
||||||
|
bits =
|
||||||
|
if stdenv.is64bit then "64"
|
||||||
|
else "32";
|
||||||
|
|
||||||
|
libpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.glibc alsaLib ];
|
||||||
|
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "mwprocapture-1.2.${version}-${kernel.version}";
|
||||||
|
version = "3269";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://www.magewell.com/files/ProCaptureForLinux_${version}.tar.gz";
|
||||||
|
sha256 = "0i1y50mf559flhxgaxy2gdpa7dvpp12ix9xfzgxa61rc135x0im4";
|
||||||
|
};
|
||||||
|
|
||||||
|
preConfigure =
|
||||||
|
''
|
||||||
|
cd ./src
|
||||||
|
export INSTALL_MOD_PATH="$out"
|
||||||
|
'';
|
||||||
|
|
||||||
|
hardeningDisable = [ "pic" "format" ];
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
|
];
|
||||||
|
|
||||||
|
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 = with stdenv.lib; {
|
||||||
|
homepage = http://www.magewell.com/;
|
||||||
|
description = "Linux driver for the Magewell Pro Capture family";
|
||||||
|
license = licenses.unfreeRedistributable;
|
||||||
|
maintainers = with maintainers; [ MP2E ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
@ -11425,6 +11425,8 @@ with pkgs;
|
|||||||
|
|
||||||
mba6x_bl = callPackage ../os-specific/linux/mba6x_bl { };
|
mba6x_bl = callPackage ../os-specific/linux/mba6x_bl { };
|
||||||
|
|
||||||
|
mwprocapture = callPackage ../os-specific/linux/mwprocapture { };
|
||||||
|
|
||||||
mxu11x0 = callPackage ../os-specific/linux/mxu11x0 { };
|
mxu11x0 = callPackage ../os-specific/linux/mxu11x0 { };
|
||||||
|
|
||||||
/* compiles but has to be integrated into the kernel somehow
|
/* compiles but has to be integrated into the kernel somehow
|
||||||
|
Loading…
Reference in New Issue
Block a user