From e228023b14541c4d0cccba397fe9b647aca61832 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Fri, 15 Jul 2016 13:21:58 +0200 Subject: [PATCH] linux_grsec_nixos: fix build The grsec patch fails to apply cleanly when combined with the hiddev CVE patch (added in dde259dfb5a0787b28e260da7575079bbabad6c3). To fix this and future problems, we set all our patches explicitly rather than inherit from the base kernel. --- pkgs/top-level/all-packages.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3d848de8a6d8..26702c793709 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11186,7 +11186,12 @@ in linux_grsec_nixos = callPackage ../build-support/grsecurity { inherit (lib) overrideDerivation; kernel = callPackage ../os-specific/linux/kernel/linux-grsecurity.nix { - inherit (self.linux_4_5) kernelPatches; + kernelPatches = with self.kernelPatches; [ bridge_stp_helper qat_common_Makefile ] + ++ lib.optionals ((platform.kernelArch or null) == "mips") + [ kernelPatches.mips_fpureg_emu + kernelPatches.mips_fpu_sigill + kernelPatches.mips_ext3_n32 + ]; }; grsecPatch = self.kernelPatches.grsecurity_testing; kernelPatches = [ self.kernelPatches.grsecurity_nixos_kmod ];