nixpkgs-suyu/pkgs/os-specific/linux/kernel/linux-copperhead-hardened.nix

31 lines
850 B
Nix
Raw Normal View History

2017-10-28 21:09:54 +02:00
{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args:
2017-09-04 17:09:29 +02:00
with stdenv.lib;
let
2018-02-08 01:47:20 +01:00
version = "4.15.2";
2017-12-28 03:40:39 +01:00
revision = "a";
2018-02-08 01:47:20 +01:00
sha256 = "1rmia5k07pfx47qkc8nx3xiap6mxbwlry3jxrx4kwf3hh5cnqnsv";
2017-09-04 17:09:29 +02:00
# modVersion needs to be x.y.z, will automatically add .0 if needed
modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));
2017-09-04 17:09:29 +02:00
# branchVersion needs to be x.y
branchVersion = concatStrings (intersperse "." (take 2 (splitString "." version)));
modDirVersion = "${modVersion}-hardened";
in
buildLinux (args // {
2017-09-04 17:09:29 +02:00
inherit modDirVersion;
version = "${version}-${revision}";
2017-09-04 17:09:29 +02:00
extraMeta.branch = "${branchVersion}";
src = fetchFromGitHub {
inherit sha256;
owner = "copperhead";
repo = "linux-hardened";
rev = "${version}.${revision}";
};
} // (args.argsOverride or {}))