summary refs log tree commit diff
path: root/pkgs/os-specific/linux/mwprocapture
diff options
context:
space:
mode:
authorCray Elliott <MP2E@archlinux.us>2017-09-03 18:50:09 -0700
committerCray Elliott <MP2E@archlinux.us>2017-09-03 18:50:09 -0700
commit1af75ba80253eaf264dec2c3f3a3deb4f04df4f0 (patch)
tree66be224a753686dcea5a77007b660a93f3deea8d /pkgs/os-specific/linux/mwprocapture
parentdeb50bcdc7a39bd4b01ae6f376b3b5ef990a1977 (diff)
downloadnixpkgs-1af75ba80253eaf264dec2c3f3a3deb4f04df4f0.tar
nixpkgs-1af75ba80253eaf264dec2c3f3a3deb4f04df4f0.tar.gz
nixpkgs-1af75ba80253eaf264dec2c3f3a3deb4f04df4f0.tar.bz2
nixpkgs-1af75ba80253eaf264dec2c3f3a3deb4f04df4f0.tar.lz
nixpkgs-1af75ba80253eaf264dec2c3f3a3deb4f04df4f0.tar.xz
nixpkgs-1af75ba80253eaf264dec2c3f3a3deb4f04df4f0.tar.zst
nixpkgs-1af75ba80253eaf264dec2c3f3a3deb4f04df4f0.zip
mwprocapture: fix build with kernels <4.13
also do some minor cleanup
Diffstat (limited to 'pkgs/os-specific/linux/mwprocapture')
-rw-r--r--pkgs/os-specific/linux/mwprocapture/default.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/mwprocapture/default.nix b/pkgs/os-specific/linux/mwprocapture/default.nix
index 544132cb284..21934dcdfac 100644
--- a/pkgs/os-specific/linux/mwprocapture/default.nix
+++ b/pkgs/os-specific/linux/mwprocapture/default.nix
@@ -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");
@@ -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 {
@@ -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 =
   ''
@@ -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;