summary refs log tree commit diff
path: root/pkgs/os-specific/linux/rtl8821ce
diff options
context:
space:
mode:
authorIvar Scholten <ivar.scholten@protonmail.com>2022-03-28 11:38:38 +0200
committerIvar Scholten <ivar.scholten@protonmail.com>2022-03-28 11:38:38 +0200
commit881e60eb98bac9ccb92f2c9d7ee05aff9afc0f37 (patch)
tree4b5aa5c092f76944d07c1f48505c9e42b892f2ec /pkgs/os-specific/linux/rtl8821ce
parent1188c14e06995cd58fe8d44006b93da3c6fa6d09 (diff)
downloadnixpkgs-881e60eb98bac9ccb92f2c9d7ee05aff9afc0f37.tar
nixpkgs-881e60eb98bac9ccb92f2c9d7ee05aff9afc0f37.tar.gz
nixpkgs-881e60eb98bac9ccb92f2c9d7ee05aff9afc0f37.tar.bz2
nixpkgs-881e60eb98bac9ccb92f2c9d7ee05aff9afc0f37.tar.lz
nixpkgs-881e60eb98bac9ccb92f2c9d7ee05aff9afc0f37.tar.xz
nixpkgs-881e60eb98bac9ccb92f2c9d7ee05aff9afc0f37.tar.zst
nixpkgs-881e60eb98bac9ccb92f2c9d7ee05aff9afc0f37.zip
linuxPackages.rtl8821ce: fix build for kernel >= 5.17
Diffstat (limited to 'pkgs/os-specific/linux/rtl8821ce')
-rw-r--r--pkgs/os-specific/linux/rtl8821ce/default.nix16
1 files changed, 14 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/rtl8821ce/default.nix b/pkgs/os-specific/linux/rtl8821ce/default.nix
index 62743c22688..039d4b3fb7b 100644
--- a/pkgs/os-specific/linux/rtl8821ce/default.nix
+++ b/pkgs/os-specific/linux/rtl8821ce/default.nix
@@ -1,4 +1,10 @@
-{ lib, stdenv, fetchFromGitHub, kernel, bc }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, kernel
+, bc
+}:
 
 stdenv.mkDerivation rec {
   pname = "rtl8821ce";
@@ -11,6 +17,12 @@ stdenv.mkDerivation rec {
     sha256 = "18ma8a8h1l90dss0k6al7q6plwr57jc9g67p22g9917k1jfbhm97";
   };
 
+  # Fixes the build on kernel >= 5.17. Can be removed once https://github.com/tomaspinho/rtl8821ce/pull/267 is merged
+  patches = [(fetchpatch {
+    url = "https://github.com/tomaspinho/rtl8821ce/commit/7b9e55df64b10fed785f22df9f36ed4a30b59d0e.patch";
+    sha256 = "sha256-mpAWOG1aXsklGuDbrRB9Vd36mgeCdctKQaWuuoqEEp0=";
+  })];
+
   hardeningDisable = [ "pic" ];
 
   nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies;
@@ -35,7 +47,7 @@ stdenv.mkDerivation rec {
     homepage = "https://github.com/tomaspinho/rtl8821ce";
     license = licenses.gpl2Only;
     platforms = platforms.linux;
-    broken = stdenv.isAarch64 || kernel.kernelAtLeast "5.17";
+    broken = stdenv.isAarch64;
     maintainers = with maintainers; [ hhm ivar ];
   };
 }