summary refs log tree commit diff
path: root/pkgs/os-specific/linux/facetimehd
diff options
context:
space:
mode:
authorkraem <ebrin.ronnie@protonmail.com>2020-04-05 21:52:12 +0200
committerkraem <ebrin.ronnie@protonmail.com>2020-04-05 22:14:54 +0200
commita5b0581cf77cb01cbb3a45e9d5f4c626a9dffa2e (patch)
tree97327f7b86f6b0e39fdd9bc9875bfe95282ffd54 /pkgs/os-specific/linux/facetimehd
parent66758bc3e597040002ffd9db333f2616184f2454 (diff)
downloadnixpkgs-a5b0581cf77cb01cbb3a45e9d5f4c626a9dffa2e.tar
nixpkgs-a5b0581cf77cb01cbb3a45e9d5f4c626a9dffa2e.tar.gz
nixpkgs-a5b0581cf77cb01cbb3a45e9d5f4c626a9dffa2e.tar.bz2
nixpkgs-a5b0581cf77cb01cbb3a45e9d5f4c626a9dffa2e.tar.lz
nixpkgs-a5b0581cf77cb01cbb3a45e9d5f4c626a9dffa2e.tar.xz
nixpkgs-a5b0581cf77cb01cbb3a45e9d5f4c626a9dffa2e.tar.zst
nixpkgs-a5b0581cf77cb01cbb3a45e9d5f4c626a9dffa2e.zip
facetimehd: update src to build with linux >= 5.6
also add kraem to maintainers
Diffstat (limited to 'pkgs/os-specific/linux/facetimehd')
-rw-r--r--pkgs/os-specific/linux/facetimehd/default.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/facetimehd/default.nix b/pkgs/os-specific/linux/facetimehd/default.nix
index 99e72c33983..d771563158b 100644
--- a/pkgs/os-specific/linux/facetimehd/default.nix
+++ b/pkgs/os-specific/linux/facetimehd/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, kernel }:
+{ stdenv, lib, fetchFromGitHub, kernel }:
 
 # facetimehd is not supported for kernels older than 3.19";
 assert stdenv.lib.versionAtLeast kernel.version "3.19";
@@ -44,9 +44,14 @@ stdenv.mkDerivation rec {
   '';
 
   hardeningDisable = [ "pic" ];
-  
+
   nativeBuildInputs = kernel.moduleBuildDependencies;
 
+  preBuild = lib.optionalString (stdenv.lib.versionAtLeast kernel.version "5.6")
+  ''
+    sed -i 's/ioremap_nocache/ioremap_cache/g' fthd_drv.c
+  '';
+
   makeFlags = [
     "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
   ];
@@ -55,7 +60,7 @@ stdenv.mkDerivation rec {
     homepage = https://github.com/patjak/bcwc_pcie;
     description = "Linux driver for the Facetime HD (Broadcom 1570) PCIe webcam";
     license = licenses.gpl2;
-    maintainers = with maintainers; [ womfoo grahamc ];
+    maintainers = with maintainers; [ womfoo grahamc kraem ];
     platforms = [ "i686-linux" "x86_64-linux" ];
   };
 }