git.iko.soy/typeable/nixpkgs
on master help sign in
mwprocapture: fix build with kernels <4.13

also do some minor cleanup

commit1af75ba80253eaf264dec2c3f3a3deb4f04df4f0 authorCray Elliott <MP2E@archlinux.us> dateSun 3 Sep 2017, 18:50 (9 years ago) parentdeb50bc
1 file changed+6−4
pkgs/os-specific/linux/mwprocapture/default.nix+6−4
pkgs/os-specific/linux/mwprocapture/default.nix+6−4
@@ -1,7 +1,9 @@
11{ stdenv, fetchurl, kernel, alsaLib }:
22
3+with stdenv.lib;
4+
35# The Magewell Pro Capture drivers are not supported for kernels older than 3.2
4−assert stdenv.lib.versionAtLeast kernel.version "3.2.0";
6+assert versionAtLeast kernel.version "3.2.0";
57
68# this package currently only supports x86 and x86_64, as I have no ARM device to test on
79assert (stdenv.system == "x86_64-linux") || (stdenv.system == "i686-linux");
@@ -11,7 +13,7 @@ let
1113 if stdenv.is64bit then "64"
1214 else "32";
1315
14− libpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.glibc alsaLib ];
16+ libpath = makeLibraryPath [ stdenv.cc.cc stdenv.glibc alsaLib ];
1517
1618in
1719stdenv.mkDerivation rec {
@@ -23,7 +25,7 @@ stdenv.mkDerivation rec {
2325 sha256 = "1arwnwrq52rs8g9zfxw8saip40vc3201sf7qnbqd2p23h8vzwb8i";
2426 };
2527
26− patches = [ ./linux_4_13_fix.patch ];
28+ patches = [] ++ optional (versionAtLeast kernel.version "4.13") ./linux_4_13_fix.patch;
2729
2830 preConfigure =
2931 ''
@@ -58,7 +60,7 @@ stdenv.mkDerivation rec {
5860 "$out"/bin/mwcap-info
5961 '';
6062
61− meta = with stdenv.lib; {
63+ meta = {
6264 homepage = http://www.magewell.com/;
6365 description = "Linux driver for the Magewell Pro Capture family";
6466 license = licenses.unfreeRedistributable;