f620b1b693
- defined buildLinux as generic.nix instead of manual-config.nix. This makes kernel derivations a tad more similar to your typical derivations. - moved $buildRoot to within the source folder, this way it doesn't have to be created before the unpackPhase and make it easier to work on kernel source without running the unpackPhase
30 lines
850 B
Nix
30 lines
850 B
Nix
{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args:
|
|
|
|
with stdenv.lib;
|
|
|
|
let
|
|
version = "4.15.1";
|
|
revision = "a";
|
|
sha256 = "1k9ng0110vzl29rzbglk3vmnpfqk04rd2mja5aqql81z5pb1x528";
|
|
|
|
# modVersion needs to be x.y.z, will automatically add .0 if needed
|
|
modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));
|
|
|
|
# branchVersion needs to be x.y
|
|
branchVersion = concatStrings (intersperse "." (take 2 (splitString "." version)));
|
|
|
|
modDirVersion = "${modVersion}-hardened";
|
|
in
|
|
buildLinux (args // {
|
|
inherit modDirVersion;
|
|
|
|
version = "${version}-${revision}";
|
|
extraMeta.branch = "${branchVersion}";
|
|
|
|
src = fetchFromGitHub {
|
|
inherit sha256;
|
|
owner = "copperhead";
|
|
repo = "linux-hardened";
|
|
rev = "${version}.${revision}";
|
|
};
|
|
} // (args.argsOverride or {}))
|