From 881e60eb98bac9ccb92f2c9d7ee05aff9afc0f37 Mon Sep 17 00:00:00 2001 From: Ivar Scholten Date: Mon, 28 Mar 2022 11:38:38 +0200 Subject: linuxPackages.rtl8821ce: fix build for kernel >= 5.17 --- pkgs/os-specific/linux/rtl8821ce/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'pkgs/os-specific/linux/rtl8821ce') 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 ]; }; } -- cgit 1.4.1