about summary refs log tree commit diff
path: root/src/libexpr/nixexpr.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-05-07T21·48+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-05-07T21·48+0000
commit77557a6f06500e0a464f54c7b4b4f5162d0359bc (patch)
tree4ebd6778b6928174224fdbaab0d7564d46c39cdc /src/libexpr/nixexpr.cc
parent6057b51835596ed282a2ad11f6f6fb8bdec13f7f (diff)
Commit 3000!
* Make the `derivation' primitive much more lazy.  The expression
  `derivation attrs' now evaluates to (essentially)

    attrs // {
      type = "derivation";
      outPath = derivation! attrs;
      drvPath = derivation! attrs;
    }

  where `derivation!' is a primop that does the actual derivation
  instantiation (i.e., it does what `derivation' used to do).  The
  advantage is that it allows commands such as `nix-env -qa' and
  `nix-env -i' to be much faster since they no longer need to
  instantiate all derivations, just the `name' attribute.  (However,
  `nix-env' doesn't yet take advantage of this since it still always
  evaluates the `outPath' and `drvPath' attributes).

  Also, this allows derivations to cyclically reference each other,
  for example,

    webServer = derivation {
      ...
      hostName = "svn.cs.uu.nl";
      services = [svnService];
    };

    svnService = derivation {
      ...
      hostName = webServer.hostName;
    };

  Previously, this would yield a black hole (infinite recursion).

Diffstat (limited to 'src/libexpr/nixexpr.cc')
0 files changed, 0 insertions, 0 deletions