@@ -1,4 +1,6 @@
11{ stdenv
2+, lib
3+, overrideDerivation
24
35# required for gcc plugins
46, gmp, libmpc, mpfr
@@ -17,22 +19,17 @@
1719
1820assert (kernel.version == grsecPatch.kver);
1921
20−(kernel.override {
22+overrideDerivation (kernel.override {
2123 inherit modDirVersion;
22− # TODO: unique is a work-around
23− kernelPatches = stdenv.lib.unique ([ grsecPatch ] ++ kernelPatches ++ (kernel.kernelPatches or []));
24+ kernelPatches = lib.unique ([ grsecPatch ] ++ kernelPatches ++ (kernel.kernelPatches or []));
2425 extraConfig = ''
2526 GRKERNSEC y
2627 PAX y
2728 ${extraConfig}
2829 '';
29−
30− # Enabling grsecurity/PaX deselects several other options implicitly,
31− # causing the configfile checker to fail (when it finds that options
32− # expected to be enabled are not).
3330 ignoreConfigErrors = true;
34−}).overrideAttrs (attrs: {
35− nativeBuildInputs = (stdenv.lib.chooseDevOutputs [ gmp libmpc mpfr ]) ++ (attrs.nativeBuildInputs or []);
31+}) (attrs: {
32+ nativeBuildInputs = (lib.chooseDevOutputs [ gmp libmpc mpfr ]) ++ (attrs.nativeBuildInputs or []);
3633 preConfigure = ''
3734 echo ${localver} >localversion-grsec
3835 ${attrs.preConfigure or ""}