nixpkgs-suyu/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix
2018-05-26 18:31:51 -04:00

30 lines
851 B
Nix

{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args:
with stdenv.lib;
let
version = "4.14.44";
revision = "a";
sha256 = "1alvhpwy9xzppwsag7qh1lkk3l4piyh2fv27w37il6gclja4dxkf";
# 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 {}))