From 6d1bf921fa8bc9049e88ec6e49834192f7b79aa5 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sun, 23 Oct 2016 18:15:07 +0200 Subject: [PATCH] grsecurity: work around #19698 This is a temporary work-around to fix using grsecurity on NixOS with the new kernelPackages/kernelPatches machinery. For whatever reason, when `security.grsecurity.enable = true`, the grsec patch ends up being applied twice, causing the kernel build to fail. Until the root cause of this is identified, we hack around it by simply pruning duplicate patches in the grsec kernel builder. Closes #19698 --- pkgs/build-support/grsecurity/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/grsecurity/default.nix b/pkgs/build-support/grsecurity/default.nix index 4379b1997ae2..ccd46e20654f 100644 --- a/pkgs/build-support/grsecurity/default.nix +++ b/pkgs/build-support/grsecurity/default.nix @@ -21,7 +21,7 @@ assert (kernel.version == grsecPatch.kver); overrideDerivation (kernel.override { inherit modDirVersion; - kernelPatches = [ grsecPatch ] ++ kernelPatches ++ (kernel.kernelPatches or []); + kernelPatches = lib.unique ([ grsecPatch ] ++ kernelPatches ++ (kernel.kernelPatches or [])); extraConfig = '' GRKERNSEC y PAX y