{ stdenv, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: with stdenv.lib; let version = "4.13.1"; revision = "a"; sha256 = "19x3rg75r4xm67wbr54iypbjsrfka7mz2vp3yswp4x4x94g457bh"; # 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 import ./generic.nix (args // { inherit modDirVersion; version = "${version}-${revision}"; extraMeta.branch = "${branchVersion}"; src = fetchFromGitHub { inherit sha256; owner = "copperhead"; repo = "linux-hardened"; rev = "${version}.${revision}"; }; kernelPatches = args.kernelPatches; features.iwlwifi = true; features.efiBootStub = true; features.needsCifsUtils = true; features.netfilterRPFilter = true; } // (args.argsOverride or {}))