about summary refs log tree commit diff
path: root/src/libstore/derivations.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-11-26T16·15+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-11-26T16·15+0100
commit8d8d47abd2a66898aa5d8999fcd75b29991e529d (patch)
tree01ff64266efd7b5bf00f9e763b43f0b0fe469219 /src/libstore/derivations.hh
parent46a369ad9558939bc2c6ee588df483ca503bbb5a (diff)
Only substitute wanted outputs of a derivation
If a derivation has multiple outputs, then we only want to download
those outputs that are actuallty needed.  So if we do "nix-build -A
openssl.man", then only the "man" output should be downloaded.
Likewise if another package depends on ${openssl.man}.

The tricky part is that different derivations can depend on different
outputs of a given derivation, so we may need to restart the
corresponding derivation goal if that happens.
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r--src/libstore/derivations.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh
index 6b7c3e6ab1..703410b925 100644
--- a/src/libstore/derivations.hh
+++ b/src/libstore/derivations.hh
@@ -85,7 +85,9 @@ extern DrvHashes drvHashes;
 typedef std::pair<string, std::set<string> > DrvPathWithOutputs;
 DrvPathWithOutputs parseDrvPathWithOutputs(const string & s);
 
-Path makeDrvPathWithOutputs(const Path & drvPath, std::set<string> outputs);
+Path makeDrvPathWithOutputs(const Path & drvPath, const std::set<string> & outputs);
+
+bool wantOutput(const string & output, const std::set<string> & wanted);
 
 
 }