2006-11-28 17:47:14 +01:00
|
|
|
{ genericSubstituter, buildEnv, shell, coreutils, findutils
|
2006-11-28 18:34:27 +01:00
|
|
|
, utillinux, kernel, udev, upstart, setuidWrapper
|
2006-11-06 23:21:50 +01:00
|
|
|
, path ? []
|
2006-11-13 12:41:27 +01:00
|
|
|
|
|
|
|
, # Whether the root device is root only. If so, we'll mount a
|
|
|
|
# ramdisk on /etc, /var and so on.
|
|
|
|
readOnlyRoot
|
2006-11-19 21:07:45 +01:00
|
|
|
|
|
|
|
, # The Upstart job configuration.
|
|
|
|
upstartJobs
|
2006-11-27 17:26:51 +01:00
|
|
|
|
|
|
|
, hostName
|
2006-11-04 01:01:13 +01:00
|
|
|
}:
|
|
|
|
|
2006-11-28 17:47:14 +01:00
|
|
|
let
|
|
|
|
|
|
|
|
startPath = [
|
2006-11-04 01:01:13 +01:00
|
|
|
coreutils
|
2006-11-07 23:05:27 +01:00
|
|
|
findutils
|
2006-11-04 01:01:13 +01:00
|
|
|
utillinux
|
2006-11-07 23:05:27 +01:00
|
|
|
udev
|
2006-11-19 19:16:29 +01:00
|
|
|
upstart
|
2006-11-28 18:34:27 +01:00
|
|
|
setuidWrapper
|
2006-11-04 01:01:13 +01:00
|
|
|
];
|
2006-11-28 17:47:14 +01:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
genericSubstituter {
|
|
|
|
src = ./boot-stage-2-init.sh;
|
|
|
|
isExecutable = true;
|
|
|
|
inherit shell kernel upstart readOnlyRoot upstartJobs hostName;
|
|
|
|
inherit startPath;
|
|
|
|
|
|
|
|
# We don't want to put all of `startPath' and `path' in $PATH, since
|
|
|
|
# then we get an embarrassingly long $PATH. So use the user
|
|
|
|
# environment builder to make a directory with symlinks to those
|
|
|
|
# packages.
|
|
|
|
fullPath = buildEnv {
|
|
|
|
name = "boot-stage-2-path";
|
|
|
|
paths = startPath ++ path;
|
|
|
|
pathsToLink = ["/bin" "/sbin" "/man/man1" "/share/man/man1"];
|
|
|
|
ignoreCollisions = true;
|
|
|
|
};
|
2006-11-28 18:34:27 +01:00
|
|
|
|
|
|
|
wrapperDir = setuidWrapper.wrapperDir;
|
2006-11-30 00:41:21 +01:00
|
|
|
|
|
|
|
accounts = ../helpers/accounts.sh;
|
2006-11-04 01:01:13 +01:00
|
|
|
}
|