summary refs log tree commit diff
path: root/pkgs/os-specific/linux/digimend/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/digimend/default.nix')
-rw-r--r--pkgs/os-specific/linux/digimend/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/digimend/default.nix b/pkgs/os-specific/linux/digimend/default.nix
index 40f801881fc..94f32d2c432 100644
--- a/pkgs/os-specific/linux/digimend/default.nix
+++ b/pkgs/os-specific/linux/digimend/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, kernel }:
+{ stdenv, fetchFromGitHub, fetchpatch, kernel }:
 
 assert stdenv.lib.versionAtLeast kernel.version "3.5";
 
@@ -20,6 +20,15 @@ stdenv.mkDerivation rec {
     sed 's/depmod /true /' -i Makefile
   '';
 
+  patches = [
+    # Fix build on Linux kernel >= 5.4
+    # https://github.com/DIGImend/digimend-kernel-drivers/pull/331
+    (fetchpatch {
+      url = "https://github.com/DIGImend/digimend-kernel-drivers/commit/fb8a2eb6a9198bb35aaccb81e22dd5ebe36124d1.patch";
+      sha256 = "1j7l5hsk59gccydpf7n6xx1ki4rm6aka7k879a7ah5jn8p1ylgw9";
+    })
+  ];
+
   nativeBuildInputs = kernel.moduleBuildDependencies;
 
   postInstall = ''