1{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args:
2
3with stdenv.lib;
4
5let
6 version = "4.15.7";
7 revision = "a";
8 sha256 = "19kgy1fa4flnqm3a50hilgjczqkscay10183cvkzy3vxrnf8fl0f";
9
10 # modVersion needs to be x.y.z, will automatically add .0 if needed
11 modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));
12
13 # branchVersion needs to be x.y
14 branchVersion = concatStrings (intersperse "." (take 2 (splitString "." version)));
15
16 modDirVersion = "${modVersion}-hardened";
17in
18buildLinux (args // {
19 inherit modDirVersion;
20
21 version = "${version}-${revision}";
22 extraMeta.branch = "${branchVersion}";
23
24 src = fetchFromGitHub {
25 inherit sha256;
26 owner = "copperhead";
27 repo = "linux-hardened";
28 rev = "${version}.${revision}";
29 };
30} // (args.argsOverride or {}))