fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ lib, stdenv, fetchurl, kernel, alsa-lib }:
2
3with lib;
4
5let
6 bits =
7 if stdenv.is64bit then "64"
8 else "32";
9
10 libpath = makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc alsa-lib ];
11
12in
13stdenv.mkDerivation rec {
14 pname = "mwprocapture";
15 subVersion = "4236";
16 version = "1.3.0.${subVersion}-${kernel.version}";
17
18 src = fetchurl {
19 url = "https://www.magewell.com/files/drivers/ProCaptureForLinux_${subVersion}.tar.gz";
20 sha256 = "1mfgj84km276sq5i8dny1vqp2ycqpvgplrmpbqwnk230d0w3qs74";
21 };
22
23 nativeBuildInputs = kernel.moduleBuildDependencies;
24
25 preConfigure = ''
26 cd ./src
27 export INSTALL_MOD_PATH="$out"
28 '';
29
30 hardeningDisable = [ "pic" "format" ];
31
32 makeFlags = [
33 "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
34 ];
35
36 postInstall = ''
37 cd ../
38 mkdir -p $out/bin
39 cp bin/mwcap-control_${bits} $out/bin/mwcap-control
40 cp bin/mwcap-info_${bits} $out/bin/mwcap-info
41 mkdir -p $out/lib/udev/rules.d
42 # source has a filename typo
43 cp scripts/10-procatpure-event-dev.rules $out/lib/udev/rules.d/10-procapture-event-dev.rules
44 cp -r src/res $out
45
46 patchelf \
47 --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
48 --set-rpath "${libpath}" \
49 "$out"/bin/mwcap-control
50
51 patchelf \
52 --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
53 --set-rpath "${libpath}" \
54 "$out"/bin/mwcap-info
55 '';
56
57 meta = {
58 broken = kernel.kernelAtLeast "5.16";
59 homepage = "http://www.magewell.com/";
60 description = "Linux driver for the Magewell Pro Capture family";
61 license = licenses.unfreeRedistributable;
62 maintainers = with maintainers; [ MP2E ];
63 platforms = platforms.linux;
64 };
65}