2010-01-13 15:17:27 +00:00
|
|
|
args @ {stdenv, fetchurl, xz, runCommand, userModeLinux ? false, extraConfig ? "",
|
|
|
|
kernelPatches ? [], extraMeta ? {},
|
|
|
|
features ? {}, preConfigure ? "",
|
|
|
|
...}:
|
|
|
|
|
|
|
|
let
|
|
|
|
conf = import ../kernel/config-blocks.nix;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
import ../kernel/generic.nix (
|
|
|
|
rec {
|
|
|
|
version = "2.6.32-zen4";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://kernel/linux/kernel/v2.6/linux-2.6.32.tar.bz2";
|
|
|
|
sha256 = "0kjhnkf2ldivagczs16q49zm2lr3khh01pqrlsc7sh5qh1npi6ah";
|
|
|
|
};
|
|
|
|
|
|
|
|
kernelPatches = [
|
|
|
|
{
|
2010-01-14 22:46:13 +00:00
|
|
|
name = "zen4";
|
2010-01-13 15:17:27 +00:00
|
|
|
patch = runCommand "2.6.32-zen4.patch" {} "${xz}/bin/lzma -d < ${ fetchurl {
|
|
|
|
name = "2.6.32-zen4";
|
|
|
|
url = "http://downloads.zen-kernel.org/2.6.32/2.6.32-zen4.patch.lzma";
|
|
|
|
sha256 = "1dyp9sfigqjfqw1c94010c521bhcy1xnzp91kkhg3dwgzfpsp2k2";
|
|
|
|
} } > $out";
|
|
|
|
}
|
|
|
|
]
|
|
|
|
++
|
|
|
|
stdenv.lib.attrByPath ["kernelPatches"] [] args;
|
|
|
|
|
|
|
|
features = {
|
|
|
|
iwlwifi = true;
|
|
|
|
zen = true;
|
|
|
|
fbConDecor = true;
|
|
|
|
aufs = true;
|
2010-01-13 22:09:12 +00:00
|
|
|
} // (stdenv.lib.attrByPath ["features"] {} args);
|
2010-01-13 15:17:27 +00:00
|
|
|
|
|
|
|
config = with conf;
|
|
|
|
''
|
|
|
|
${generalOptions}
|
|
|
|
${noDebug}
|
|
|
|
${virtualisation}
|
2010-01-13 22:09:12 +00:00
|
|
|
${if stdenv.lib.attrByPath ["features" "oldI686"] false args then noPAE else ""}
|
2010-01-13 15:17:27 +00:00
|
|
|
${usefulSubsystems}
|
|
|
|
${cfq}
|
|
|
|
${noNUMA}
|
|
|
|
${networking}
|
|
|
|
${wireless}
|
|
|
|
${fb}
|
|
|
|
${fbConDecor}
|
|
|
|
${sound}
|
|
|
|
${usbserial}
|
|
|
|
${fsXattr}
|
|
|
|
${security}
|
|
|
|
${blockDevices}
|
|
|
|
${bluetooth}
|
|
|
|
${misc}
|
2010-01-13 22:09:12 +00:00
|
|
|
${if stdenv.lib.attrByPath ["features" "ckSched"] false args then bfsched else ""}
|
2010-01-13 15:17:27 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
mv README.zen README-zen
|
|
|
|
'' + stdenv.lib.attrByPath ["preConfigure"] "" args;
|
|
|
|
|
|
|
|
extraMeta = {
|
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
|
|
|
platforms = with stdenv.lib.platforms;
|
|
|
|
linux;
|
2010-01-14 08:06:24 +00:00
|
|
|
} // stdenv.lib.attrByPath ["extraMeta"] {} args;
|
2010-01-13 15:17:27 +00:00
|
|
|
}
|
|
|
|
// removeAttrs args ["extraConfig" "extraMeta" "features" "kernelPatches"
|
|
|
|
"xz" "runCommand" "preConfigure"]
|
|
|
|
)
|