Commit graph

4 commits

Author SHA1 Message Date
Eelco Dolstra 7f893b7a43 * Allow derivations to hint that they should not be built remotely
using the build hook mechanism, by setting the derivation attribute
  "preferLocalBuild" to true.  This has a few use cases:

  - The user environment builder.  Since it just creates a bunch of
    symlinks without much computation, there is no reason to do it
    remotely.  In fact, doing it remotely requires the entire closure
    of the user environment to be copied to the remote machine, which
    is extremely wasteful.

  - `fetchurl'.  Performing the download on a remote machine and then
    copying it to the local machine involves twice as much network
    traffic as performing the download locally, and doesn't save any
    CPU cycles on the local machine.
2010-08-04 12:13:58 +00:00
Eelco Dolstra a46db5d013 * Package conflict resolution through priority levels. If there is a
user environment collission between two packages due to overlapping
  file names, then a package with a higher priority will overwrite the
  symlinks of a package with a lower priority.  E.g.,

    $ nix-env --set-flag priority 5 gcc
    $ nix-env --set-flag priority 10 binutils

  gives gcc a higher priority than binutils (higher number = lower
  priority).
2007-04-27 23:28:44 +00:00
Eelco Dolstra 3d05166086 * Allow conflicting packages to be kept in a user environment, and
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.
2007-04-27 22:40:59 +00:00
Eelco Dolstra 9898746ef3 * nix-env: a tool to manage user environments.
* Replace all directory reading code by a generic readDirectory()
  function.
2003-11-19 17:27:16 +00:00