allow switching between them (NIX-80).
Example: two versions of Pan:
$ nix-env -q pan
pan-0.128
pan-0.14.2.91
$ readlink $(which pan)
/nix/store/l38jrbilw269drpjkx7kinhrxj6fjh59-pan-0.14.2.91/bin/pan
At most one of them can be active any given time. Assuming than
0.14.2.91 is active, you can active 0.128 as follows:
$ nix-env --set-flag active false pan-0.14.2.91
$ nix-env --set-flag active true pan-0.128
$ readlink $(which pan)
/nix/store/nziqwnlzy7xl385kglxhg75pfl5i936n-pan-0.128/bin/pan
More flags to follow.
13 lines
341 B
Nix
13 lines
341 B
Nix
{system, derivations, manifest}:
|
|
|
|
derivation {
|
|
name = "user-environment";
|
|
system = system;
|
|
builder = ./builder.pl;
|
|
derivations = derivations;
|
|
manifest = manifest;
|
|
|
|
# !!! grmbl, need structured data for passing this in a clean way.
|
|
active = map (x: if x ? meta && x.meta ? active then x.meta.active else "true") derivations;
|
|
}
|