Skip to content

Commit

Permalink
mwprocapture: fix build with kernels <4.13
Browse files Browse the repository at this point in the history
also do some minor cleanup
  • Loading branch information
Cray Elliott authored and Cray Elliott committed Sep 4, 2017
1 parent deb50bc commit 1af75ba
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkgs/os-specific/linux/mwprocapture/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{ stdenv, fetchurl, kernel, alsaLib }:

with stdenv.lib;

# The Magewell Pro Capture drivers are not supported for kernels older than 3.2
assert stdenv.lib.versionAtLeast kernel.version "3.2.0";
assert 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");
Expand All @@ -11,7 +13,7 @@ let
if stdenv.is64bit then "64"
else "32";

libpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.glibc alsaLib ];
libpath = makeLibraryPath [ stdenv.cc.cc stdenv.glibc alsaLib ];

in
stdenv.mkDerivation rec {
Expand All @@ -23,7 +25,7 @@ stdenv.mkDerivation rec {
sha256 = "1arwnwrq52rs8g9zfxw8saip40vc3201sf7qnbqd2p23h8vzwb8i";
};

patches = [ ./linux_4_13_fix.patch ];
patches = [] ++ optional (versionAtLeast kernel.version "4.13") ./linux_4_13_fix.patch;

preConfigure =
''
Expand Down Expand Up @@ -58,7 +60,7 @@ stdenv.mkDerivation rec {
"$out"/bin/mwcap-info
'';

meta = with stdenv.lib; {
meta = {
homepage = http://www.magewell.com/;
description = "Linux driver for the Magewell Pro Capture family";
license = licenses.unfreeRedistributable;
Expand Down

0 comments on commit 1af75ba

Please sign in to comment.