summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2016-10-23 18:15:07 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2016-10-23 18:25:29 +0200
commit6d1bf921fa8bc9049e88ec6e49834192f7b79aa5 (patch)
treec945a5b659b45e46c2035cfd1f8fb77accd2ae3a /pkgs/build-support
parent2406387fd6312beebc0800bd347d10dd1178e9a8 (diff)
downloadnixlib-6d1bf921fa8bc9049e88ec6e49834192f7b79aa5.tar
nixlib-6d1bf921fa8bc9049e88ec6e49834192f7b79aa5.tar.gz
nixlib-6d1bf921fa8bc9049e88ec6e49834192f7b79aa5.tar.bz2
nixlib-6d1bf921fa8bc9049e88ec6e49834192f7b79aa5.tar.lz
nixlib-6d1bf921fa8bc9049e88ec6e49834192f7b79aa5.tar.xz
nixlib-6d1bf921fa8bc9049e88ec6e49834192f7b79aa5.tar.zst
nixlib-6d1bf921fa8bc9049e88ec6e49834192f7b79aa5.zip
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
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/grsecurity/default.nix2
1 files changed, 1 insertions, 1 deletions
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