1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/boot/boot-stage-2.nix
Eelco Dolstra 362f0f752b * Don't put every package in the boot environment in $PATH but rather
create a symlink tree and put that in $PATH.

svn path=/nixos/trunk/; revision=7161
2006-11-28 16:47:14 +00:00

46 lines
975 B
Nix

{ genericSubstituter, buildEnv, shell, coreutils, findutils
, utillinux, kernel, udev, upstart
, path ? []
, # Whether the root device is root only. If so, we'll mount a
# ramdisk on /etc, /var and so on.
readOnlyRoot
, # The Upstart job configuration.
upstartJobs
, hostName
}:
let
startPath = [
coreutils
findutils
utillinux
udev
upstart
];
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;
};
extraPath = path;
}