about summary refs log tree commit diff
path: root/src/libstore/derivations.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r--src/libstore/derivations.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc
index 1551ae28a8..d91e42784c 100644
--- a/src/libstore/derivations.cc
+++ b/src/libstore/derivations.cc
@@ -261,7 +261,7 @@ DrvPathWithOutputs parseDrvPathWithOutputs(const string & s)
 }
 
 
-Path makeDrvPathWithOutputs(const Path & drvPath, std::set<string> outputs)
+Path makeDrvPathWithOutputs(const Path & drvPath, const std::set<string> & outputs)
 {
     return outputs.empty()
         ? drvPath
@@ -269,4 +269,10 @@ Path makeDrvPathWithOutputs(const Path & drvPath, std::set<string> outputs)
 }
 
 
+bool wantOutput(const string & output, const std::set<string> & wanted)
+{
+    return wanted.empty() || wanted.find(output) != wanted.end();
+}
+
+
 }