nixpkgs/boot/boot-stage-2.nix
Nicolas Pierron bb8fc2646e Substitute the "require" of imported modules by module paths.
$ sed -i '/require =/ { :b; s,(import \([^)]*\)),\1,; /];/ { b e }; n; b b; :e }' *.nix


svn path=/nixos/branches/modular-nixos/; revision=15660
2009-05-19 23:14:45 +00:00

52 lines
1 KiB
Nix

{pkgs, config, ...}:
let
inherit (pkgs) substituteAll writeText coreutils utillinux udev upstart;
kernel = config.boot.kernelPackages.kernel;
activateConfiguration = config.system.activationScripts.script;
inherit (config.boot) isLiveCD;
# Path for Upstart jobs. Should be quite minimal.
upstartPath = [
pkgs.coreutils
pkgs.findutils
pkgs.gnugrep
pkgs.gnused
pkgs.upstart
];
bootLocal = config.boot.localCommands;
bootStage2 = substituteAll {
src = ./boot-stage-2-init.sh;
isExecutable = true;
inherit kernel upstart isLiveCD activateConfiguration upstartPath;
path = [
coreutils
utillinux
udev
upstart
];
bootLocal = writeText "local-cmds" bootLocal;
};
in
{
require = [
# config.boot.localCommands
# config.boot.kernelPackages
# config.system.activationScripts
../system/activate-configuration.nix
# config.system.build
../system/system-options.nix
];
system = {
build = {
inherit bootStage2;
};
};
}