mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
fc54ece470
This reverts commit 3d9017602b
.
This didn't quite work as I had expected ... While it seemed okay at
first, it fails to propagate all the attributes it used to (notably
features). I'll revisit this later but reverting for now.
37 lines
774 B
Nix
37 lines
774 B
Nix
{ stdenv
|
|
, lib
|
|
, overrideDerivation
|
|
|
|
# required for gcc plugins
|
|
, gmp, libmpc, mpfr
|
|
|
|
# the base kernel
|
|
, kernel
|
|
|
|
, grsecPatch
|
|
, kernelPatches ? []
|
|
|
|
, localver ? "-grsec"
|
|
, modDirVersion ? "${kernel.version}${localver}"
|
|
, extraConfig ? ""
|
|
, ...
|
|
} @ args:
|
|
|
|
assert (kernel.version == grsecPatch.kver);
|
|
|
|
overrideDerivation (kernel.override {
|
|
inherit modDirVersion;
|
|
kernelPatches = lib.unique ([ grsecPatch ] ++ kernelPatches ++ (kernel.kernelPatches or []));
|
|
extraConfig = ''
|
|
GRKERNSEC y
|
|
PAX y
|
|
${extraConfig}
|
|
'';
|
|
ignoreConfigErrors = true;
|
|
}) (attrs: {
|
|
nativeBuildInputs = (lib.chooseDevOutputs [ gmp libmpc mpfr ]) ++ (attrs.nativeBuildInputs or []);
|
|
preConfigure = ''
|
|
echo ${localver} >localversion-grsec
|
|
${attrs.preConfigure or ""}
|
|
'';
|
|
})
|