mwprocapture: init at 1.2.3269 (#22160)

authored by

Cray Elliott and committed by
Joachim F
5e0b978e 78abfe95

+130
+61
nixos/modules/hardware/video/capture/mwprocapture.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let 6 + 7 + cfg = config.hardware.mwProCapture; 8 + 9 + kernelPackages = config.boot.kernelPackages; 10 + 11 + in 12 + 13 + { 14 + 15 + options.hardware.mwProCapture.enable = mkEnableOption "Magewell Pro Capture family kernel module"; 16 + 17 + config = mkIf cfg.enable { 18 + 19 + assertions = singleton { 20 + assertion = versionAtLeast kernelPackages.kernel.version "3.2"; 21 + message = "Magewell Pro Capture family module is not supported for kernels older than 3.2"; 22 + }; 23 + 24 + boot.kernelModules = [ "ProCapture" ]; 25 + 26 + environment.systemPackages = [ kernelPackages.mwprocapture ]; 27 + 28 + boot.extraModulePackages = [ kernelPackages.mwprocapture ]; 29 + 30 + boot.extraModprobeConfig = '' 31 + # Set the png picture to be displayed when no input signal is detected. 32 + options ProCapture nosignal_file=${kernelPackages.mwprocapture}/res/NoSignal.png 33 + 34 + # Set the png picture to be displayed when an unsupported input signal is detected. 35 + options ProCapture unsupported_file=${kernelPackages.mwprocapture}/res/Unsupported.png 36 + 37 + # Set the png picture to be displayed when an loking input signal is detected. 38 + options ProCapture locking_file=${kernelPackages.mwprocapture}/res/Locking.png 39 + 40 + # Message signaled interrupts switch 41 + #options ProCapture disable_msi=0 42 + 43 + # Set the debug level 44 + #options ProCapture debug_level=0 45 + 46 + # Force init switch eeprom 47 + #options ProCapture init_switch_eeprom=0 48 + 49 + # Min frame interval for VIDIOC_ENUM_FRAMEINTERVALS (default: 166666(100ns)) 50 + #options ProCapture enum_frameinterval_min=166666 51 + 52 + # VIDIOC_ENUM_FRAMESIZES type (1: DISCRETE; 2: STEPWISE; otherwise: CONTINUOUS ) 53 + #options ProCapture enum_framesizes_type=0 54 + 55 + # Parameters for internal usage 56 + #options ProCapture internal_params="" 57 + ''; 58 + 59 + }; 60 + 61 + }
+1
nixos/modules/module-list.nix
··· 41 41 ./hardware/video/amdgpu.nix 42 42 ./hardware/video/amdgpu-pro.nix 43 43 ./hardware/video/ati.nix 44 + ./hardware/video/capture/mwprocapture.nix 44 45 ./hardware/video/bumblebee.nix 45 46 ./hardware/video/displaylink.nix 46 47 ./hardware/video/nvidia.nix
+66
pkgs/os-specific/linux/mwprocapture/default.nix
··· 1 + { stdenv, fetchurl, kernel, alsaLib }: 2 + 3 + # The Magewell Pro Capture drivers are not supported for kernels older than 3.2 4 + assert stdenv.lib.versionAtLeast kernel.version "3.2.0"; 5 + 6 + # this package currently only supports x86 and x86_64, as I have no ARM device to test on 7 + assert (stdenv.system == "x86_64-linux") || (stdenv.system == "i686-linux"); 8 + 9 + let 10 + bits = 11 + if stdenv.is64bit then "64" 12 + else "32"; 13 + 14 + libpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.glibc alsaLib ]; 15 + 16 + in 17 + stdenv.mkDerivation rec { 18 + name = "mwprocapture-1.2.${version}-${kernel.version}"; 19 + version = "3269"; 20 + 21 + src = fetchurl { 22 + url = "http://www.magewell.com/files/ProCaptureForLinux_${version}.tar.gz"; 23 + sha256 = "0i1y50mf559flhxgaxy2gdpa7dvpp12ix9xfzgxa61rc135x0im4"; 24 + }; 25 + 26 + preConfigure = 27 + '' 28 + cd ./src 29 + export INSTALL_MOD_PATH="$out" 30 + ''; 31 + 32 + hardeningDisable = [ "pic" "format" ]; 33 + 34 + makeFlags = [ 35 + "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 36 + ]; 37 + 38 + postInstall = '' 39 + cd ../ 40 + mkdir -p $out/bin 41 + cp bin/mwcap-control_${bits} $out/bin/mwcap-control 42 + cp bin/mwcap-info_${bits} $out/bin/mwcap-info 43 + mkdir -p $out/lib/udev/rules.d 44 + # source has a filename typo 45 + cp scripts/10-procatpure-event-dev.rules $out/lib/udev/rules.d/10-procapture-event-dev.rules 46 + cp -r src/res $out 47 + 48 + patchelf \ 49 + --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \ 50 + --set-rpath "${libpath}" \ 51 + "$out"/bin/mwcap-control 52 + 53 + patchelf \ 54 + --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \ 55 + --set-rpath "${libpath}" \ 56 + "$out"/bin/mwcap-info 57 + ''; 58 + 59 + meta = with stdenv.lib; { 60 + homepage = http://www.magewell.com/; 61 + description = "Linux driver for the Magewell Pro Capture family"; 62 + license = licenses.unfreeRedistributable; 63 + maintainers = with maintainers; [ MP2E ]; 64 + platforms = platforms.linux; 65 + }; 66 + }
+2
pkgs/top-level/all-packages.nix
··· 11425 11425 11426 11426 mba6x_bl = callPackage ../os-specific/linux/mba6x_bl { }; 11427 11427 11428 + mwprocapture = callPackage ../os-specific/linux/mwprocapture { }; 11429 + 11428 11430 mxu11x0 = callPackage ../os-specific/linux/mxu11x0 { }; 11429 11431 11430 11432 /* compiles but has to be integrated into the kernel somehow