2003-11-03 11:22:00 +01:00
|
|
|
# Given a system identifier, this function returns a derivation of a
|
|
|
|
# user environment, i.e., a set of symbolic links to `activated'
|
|
|
|
# packages. The resulting package is typically passed to the
|
|
|
|
# `nix-switch' command in order to actually activate it.
|
|
|
|
|
|
|
|
{system}: let {
|
|
|
|
# All activated packages.
|
|
|
|
pkgs = (import ./all-packages.fix) {system = system};
|
|
|
|
|
2003-11-03 17:18:00 +01:00
|
|
|
# The packages selection for inclusion in the user environment.
|
|
|
|
# This list should be generated automatically by a package
|
|
|
|
# management user interface.
|
|
|
|
selectedPkgs = [
|
|
|
|
pkgs.aterm
|
2003-11-05 13:17:48 +01:00
|
|
|
pkgs.subversion
|
2003-11-03 17:18:00 +01:00
|
|
|
];
|
2003-11-03 11:22:00 +01:00
|
|
|
|
2003-11-03 17:18:00 +01:00
|
|
|
# Create a user environment.
|
2003-11-03 11:22:00 +01:00
|
|
|
body = derivation {
|
|
|
|
name = "user-environment";
|
|
|
|
system = system;
|
|
|
|
builder = ./populate-linkdirs.pl;
|
|
|
|
dirs = selectedPkgs;
|
|
|
|
};
|
|
|
|
}
|