Commit graph

14 commits

Author SHA1 Message Date
Eelco Dolstra
7ba1fd2029 * Regularise help text a bit. 2006-03-06 11:04:39 +00:00
Eelco Dolstra
1d2460ee5d * Documentation fixes. 2005-12-24 23:22:05 +00:00
Eelco Dolstra
b87b9c0d1f * New query option: --compare-versions' or -c' to compare installed
versions to available versions, or vice versa.

  For example, the following compares installed versions to available
  versions:

    $ nix-env -qc
    autoconf-2.59            = 2.59
    automake-1.9.4           < 1.9.6
    f-spot-0.0.10            - ?
    firefox-1.0.4            < 1.0.7
    ...

  I.e., there are newer versions available (in the current default Nix
  expression) for Automake and Firefox, but not for Autoconf, and
  F-Spot is missing altogether.

  Conversely, the available versions can be compared to the installed
  versions:

    $ nix-env -qac
    autoconf-2.59                  = 2.59
    automake-1.9.6                 > 1.9.4
    bash-3.0                       - ?
    firefox-1.0.7                  > 1.0.4
    ...

  Note that bash is available but no version of it is installed.

  If multiple versions are available for comparison, then the highest
  is used.  E.g., if Subversion 1.2.0 is installed, and Subversion
  1.1.4 and 1.2.3 are available, then `nix-env -qc' will print `<
  1.2.3', not `> 1.1.4'.

  If higher versions are available, the version column is printed in
  red (using ANSI escape codes).
2005-10-06 14:44:54 +00:00
Eelco Dolstra
20ce2642fc * Refactoring to support different installation sources in nix-env.
* Set the references for the user environment manifest properly.
* Don't copy the manifest (this was accidental).
* Don't store derivation paths in the manifest (maybe this should be
  made optional).  This cleans up the semantics of nix-env, which were
  weird.
* Hash on the output paths of activated components, not on derivation
  paths.  This is because we don't know the derivation path of already
  installed components anymore, and it allows the installation of
  components by store path (skipping Nix expressions entirely).
* Query options `--out-path' and `--drv-path' to show the output and
  derivation paths of components, respectively (the latter replaces
  the `--expr' query).
2005-02-11 16:56:45 +00:00
Eelco Dolstra
54c7a870d5 * Document --delete-generations and other nix-env options. 2004-11-12 23:56:37 +00:00
Eelco Dolstra
618aa69b01 * In --upgrade': added flags --lt', --leq', --always' to specify
whether we want to upgrade if the current version is less than the
  available version (default), when it is less or equal, or always.
  
* Added a flag `--dry-run' to show what would happen in `--install',
  `--uninstall', and `--upgrade', without actually performing the
  operation.
2004-02-09 11:59:39 +00:00
Eelco Dolstra
06a75a7e0c * A command `--switch-generation' to switch to a specific generation
of the current profile, e.g.,

    $ nix-env --list-generations
    ...
    39   2004-02-02 17:53:53
    40   2004-02-02 17:55:18
    41   2004-02-02 17:55:41
    42   2004-02-02 17:55:50   (current)

    $ nix-env --switch-generation 39

    $ ls -l /nix/var/nix/profiles/default
    ... default -> default-39-link

* Also a command `--rollback' which is just a convenience operation to
  rollback to the oldest generation younger than the current one.

  Note that generations properly form a tree.  E.g., if after
  switching to generation 39, we perform an installation action,
  a generation 43 is created which is a descendant of 39, not 42.  So
  a rollback from 43 ought to go back to 39.  This is not currently
  implemented; generations form a linear sequence.
2004-02-08 14:07:43 +00:00
Eelco Dolstra
66e94d3275 * Improvements to profiles. Generations are now per-profile, e.g.,
default -> default-94-link
  default-82-link -> /nix/store/cc4480...
  default-83-link -> /nix/store/caeec8...
  ...
  default-94-link -> /nix/store/2896ca...
  experimental -> experimental-2-link
  experimental-1-link -> /nix/store/cc4480...
  experimental-2-link -> /nix/store/a3148f...

* `--profile' / `-p' -> `--switch-profile' / `-S'
* `--link' / `-l' -> `--profile' / `-p'
* The default profile is stored in $prefix/var/nix/profiles.
  $prefix/var/nix/links is gone.  Profiles can be stored anywhere.
* The current profile is now referenced from ~/.nix-profile, not
  ~/.nix-userenv.
* The roots to the garbage collector now have extension `.gcroot', not
  `.id'.
2004-02-06 10:30:20 +00:00
Eelco Dolstra
d9f30fe7c7 * Sort `nix-env -q' output by derivation name.
* `--version' flag for all commands.
* Manual updates.
2004-02-02 10:51:54 +00:00
Eelco Dolstra
4a373a3e9a * Implemented Eelco V.'s `nix-env -I' command to specify the default
path of the Nix expression to be used with the import, upgrade, and
  query commands.  For instance,

  $ nix-env -I ~/nixpkgs/pkgs/system/i686-linux.nix

  $ nix-env --query --available   [aka -qa]
  sylpheed-0.9.7
  bison-1.875
  pango-1.2.5
  subversion-0.35.1
  ...

  $ nix-env -i sylpheed

  $ nix-env -u subversion

  There can be only one default at a time.

* If the path to a Nix expression is a symlink, follow the symlink
  prior to resolving relative path references in the expression.
2004-01-05 16:26:43 +00:00
Eelco Dolstra
f83c5e3e5f * Implemented Eelco V.'s `-p' command to switch profiles. It switches
the symlink ~/.nix-userenv to the given argument (which defaults to
  .../links/current).  /etc/profile.d/nix-profile creates this symlink
  if it doesn't exist yet.  Example use:

  $ nix-env -l my_profile -i foo.nix subversion quake
  $ nix-env -p my_profile

  I don't like the term "profile".  Let's deprecate it :-)
2004-01-05 11:18:59 +00:00
Eelco Dolstra
f3c9783846 * Version numbers can be omitted in install/uninstall. E.g.,
nix-env -i foo.nix subversion

  The version number part of a derivation name is defined as everything following the 
  first dash not followed by a letter.
2003-12-21 23:58:56 +00:00
Eelco Dolstra
a81b621202 * -u' -> -e'.
* `--link' / `-l' flag to specify the switch symlink to use (by default, 
  /nix/var/nix/links/current).
2003-12-21 22:34:41 +00:00
Eelco Dolstra
078e20885e * Help text for all (non-script) programs, so no more:
$ nix-instantiate --help
error: unknown flag `--help`
Try `nix-instantiate --help' for more information.

:-)
2003-12-01 15:55:05 +00:00