about summary refs log tree commit diff
path: root/corepkgs/buildenv/default.nix
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-04-27T22·40+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-04-27T22·40+0000
commit3d05166086682b39e013001bdaedb3e8b68a769f (patch)
treefeb2c608b31cda127195a20c846a52229fe5cf4a /corepkgs/buildenv/default.nix
parentb7f0f65c1934851b038826b2ab78c0378a36143a (diff)
* 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.

Diffstat (limited to 'corepkgs/buildenv/default.nix')
-rw-r--r--corepkgs/buildenv/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/corepkgs/buildenv/default.nix b/corepkgs/buildenv/default.nix
index 9bc704d8d511..a5452db5ea89 100644
--- a/corepkgs/buildenv/default.nix
+++ b/corepkgs/buildenv/default.nix
@@ -6,4 +6,7 @@ derivation {
   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;
 }