lix/src/libexpr
Eelco Dolstra d329c3ea9d * Support multiple outputs. A derivation can declare multiple outputs
by setting the ‘outputs’ attribute.  For example:

    stdenv.mkDerivation {
      name = "aterm-2.5";

      src = ...;

      outputs = [ "out" "tools" "dev" ];

      configureFlags = "--bindir=$(tools)/bin --includedir=$(dev)/include";
    }

  This derivation creates three outputs, named like this:

    /nix/store/gcnqgllbh01p3d448q8q6pzn2nc2gpyl-aterm-2.5
    /nix/store/gjf1sgirwfnrlr0bdxyrwzpw2r304j02-aterm-2.5-tools
    /nix/store/hp6108bqfgxvza25nnxfs7kj88xi2vdx-aterm-2.5-dev

  That is, the symbolic name of the output is suffixed to the store
  path (except for the ‘out’ output).  Each path is passed to the
  builder through the corresponding environment variable, e.g.,
  ${tools}.

  The main reason for multiple outputs is to allow parts of a package
  to be distributed and garbage-collected separately.  For instance,
  most packages depend on Glibc for its libraries, but don't need its
  header files.  If these are separated into different store paths,
  then a package that depends on the Glibc libraries only causes the
  libraries and not the headers to be downloaded.

  The main problem with multiple outputs is that if one output exists
  while the others have been garbage-collected (or never downloaded in
  the first place), and we want to rebuild the other outputs, then
  this isn't possible because we can't clobber a valid output (it
  might be in active use).  This currently gives an error message
  like:

    error: derivation `/nix/store/1s9zw4c8qydpjyrayxamx2z7zzp5pcgh-aterm-2.5.drv' is blocked by its output paths

  There are two solutions: 1) Do the build in a chroot.  Then we don't
  need to overwrite the existing path.  2) Use hash rewriting (see the
  ASE-2005 paper).  Scary but it should work.

  This is not finished yet.  There is not yet an easy way to refer to
  non-default outputs in Nix expressions.  Also, mutually recursive
  outputs aren't detected yet and cause the garbage collector to
  crash.
2011-07-18 23:31:03 +00:00
..
attr-path.cc * Store attribute sets as a vector instead of a map (i.e. a red-black 2010-10-24 00:41:29 +00:00
attr-path.hh * Store Value nodes outside of attribute sets. I.e., Attr now stores 2010-10-22 14:47:42 +00:00
common-opts.cc * Keep attribute sets in sorted order to speed up attribute lookups. 2010-10-24 19:52:33 +00:00
common-opts.hh * Update autoCallFunction() and findAlongAttrPath(). 2010-04-07 15:47:06 +00:00
eval.cc * Allow a default value in attribute selection by writing 2011-07-13 12:19:57 +00:00
eval.hh * When allocating an attribute set, reserve enough space for all 2010-10-24 20:09:37 +00:00
get-drvs.cc * Keep attribute sets in sorted order to speed up attribute lookups. 2010-10-24 19:52:33 +00:00
get-drvs.hh * DrvInfo contains pointers to expressions, so DrvInfos should be 2010-11-25 13:47:34 +00:00
lexer.l * Allow a default value in attribute selection by writing 2011-07-13 12:19:57 +00:00
Makefile.am Use $BDW_GC_LIBS instead of a custom variable. 2011-02-09 21:23:13 +00:00
names.cc * Export the nix-env derivation name parsing and version comparison 2008-07-01 10:10:32 +00:00
names.hh * Export the nix-env derivation name parsing and version comparison 2008-07-01 10:10:32 +00:00
nix.sdf First attempt to update Nix SDF grammar to match the actual bison grammar 2008-06-04 14:36:46 +00:00
nixexpr.cc * Allow a default value in attribute selection by writing 2011-07-13 12:19:57 +00:00
nixexpr.hh * Allow a default value in attribute selection by writing 2011-07-13 12:19:57 +00:00
parser.hh * Use a symbol table to represent identifiers and attribute names 2010-04-13 12:25:42 +00:00
parser.y * Allow attribute names to be strings. Based on the 2011-07-13 15:53:24 +00:00
primops.cc * Support multiple outputs. A derivation can declare multiple outputs 2011-07-18 23:31:03 +00:00
symbol-table.hh * Store attribute sets as a vector instead of a map (i.e. a red-black 2010-10-24 00:41:29 +00:00
value-to-xml.cc * Keep attribute sets in sorted order to speed up attribute lookups. 2010-10-24 19:52:33 +00:00
value-to-xml.hh * Make sure that config.h is included before the system headers, 2010-10-04 17:55:38 +00:00