grsecurity: overrideDerivation -> overrideAttrs

This commit is contained in:
Joachim Fasting 2017-02-09 16:21:20 +01:00
parent 28b5cc7dca
commit 3d9017602b
No known key found for this signature in database
GPG Key ID: 7544761007FE4E08

View File

@ -1,6 +1,4 @@
{ stdenv
, lib
, overrideDerivation
# required for gcc plugins
, gmp, libmpc, mpfr
@ -19,17 +17,22 @@
assert (kernel.version == grsecPatch.kver);
overrideDerivation (kernel.override {
(kernel.override {
inherit modDirVersion;
kernelPatches = lib.unique ([ grsecPatch ] ++ kernelPatches ++ (kernel.kernelPatches or []));
# TODO: unique is a work-around
kernelPatches = stdenv.lib.unique ([ grsecPatch ] ++ kernelPatches ++ (kernel.kernelPatches or []));
extraConfig = ''
GRKERNSEC y
PAX y
${extraConfig}
'';
# Enabling grsecurity/PaX deselects several other options implicitly,
# causing the configfile checker to fail (when it finds that options
# expected to be enabled are not).
ignoreConfigErrors = true;
}) (attrs: {
nativeBuildInputs = (lib.chooseDevOutputs [ gmp libmpc mpfr ]) ++ (attrs.nativeBuildInputs or []);
}).overrideAttrs (attrs: {
nativeBuildInputs = (stdenv.lib.chooseDevOutputs [ gmp libmpc mpfr ]) ++ (attrs.nativeBuildInputs or []);
preConfigure = ''
echo ${localver} >localversion-grsec
${attrs.preConfigure or ""}