diff options
Diffstat (limited to 'src/libstore/path-with-outputs.hh')
-rw-r--r-- | src/libstore/path-with-outputs.hh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstore/path-with-outputs.hh b/src/libstore/path-with-outputs.hh index 4c4023dcb..e4235d197 100644 --- a/src/libstore/path-with-outputs.hh +++ b/src/libstore/path-with-outputs.hh @@ -32,4 +32,16 @@ StorePathWithOutputs parsePathWithOutputs(const Store & store, std::string_view StorePathWithOutputs followLinksToStorePathWithOutputs(const Store & store, std::string_view pathWithOutputs); +typedef std::set<std::string> OutputNames; + +struct AllOutputs { }; + +struct DefaultOutputs { }; + +typedef std::variant<DefaultOutputs, AllOutputs, OutputNames> OutputsSpec; + +/* Parse a string of the form 'prefix^output1,...outputN' or + 'prefix^*', returning the prefix and the outputs spec. */ +std::pair<std::string, OutputsSpec> parseOutputsSpec(const std::string & s); + } |