lix/src/nix-env
Eelco Dolstra 2c1ecf8e81 nix-env -i: Add a flag ‘--remove-all’ / ‘-r’
This is equivalent to running ‘nix-env -e '*'’ first, except that it
happens in a single transaction.  Thus, ‘nix-env -i pkgs...’ replaces
the profile with the specified set of packages.

The main motivation is to support declarative package management
(similar to environment.systemPackages in NixOS).  That is, if you
have a specification ‘profile.nix’ like this:

  with import <nixpkgs> {};
  [ thunderbird
    geeqie
    ...
  ]

then after any change to ‘profile.nix’, you can run:

  $ nix-env -f profile.nix -ir

to update the profile to match the specification.  (Without the ‘-r’
flag, if you remove a package from ‘profile.nix’, it won't be removed
from the actual profile.)

Suggested by @zefhemel.
2013-09-03 21:21:14 +02:00
..
Makefile.am When ‘--help’ is given, just run ‘man’ to show the manual page 2012-10-03 16:40:09 -04:00
nix-env.cc nix-env -i: Add a flag ‘--remove-all’ / ‘-r’ 2013-09-03 21:21:14 +02:00
profiles.cc Whitespace 2012-12-03 18:19:49 +01:00
profiles.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
user-env.cc nix-env: Install all outputs of a derivation 2012-12-04 14:20:36 +01:00
user-env.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00