aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/path-with-outputs.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-03-02 01:06:08 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-04-05 08:31:37 -0400
commit32f4454b9fa3ac30d58e738ece322eb19a0728ba (patch)
tree59b41091540beefea78c3eaa7decb06bc9db2bd9 /src/libstore/path-with-outputs.hh
parent7a2b566dc8f0f94fdd6acbce90e47cd967f9f134 (diff)
Move `StorePathWithOutput` utilities out of store class
These are by no means part of the notion of a store, but rather are things that happen to use stores. (Or put another way, there's no way we'd make them virtual methods any time soon.) It's better to move them out of that too-big class then. Also, this helps us remove StorePathWithOutputs from the Store interface altogether next commit.
Diffstat (limited to 'src/libstore/path-with-outputs.hh')
-rw-r--r--src/libstore/path-with-outputs.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstore/path-with-outputs.hh b/src/libstore/path-with-outputs.hh
index a9e3fc7c2..0e34b5aa1 100644
--- a/src/libstore/path-with-outputs.hh
+++ b/src/libstore/path-with-outputs.hh
@@ -14,4 +14,13 @@ struct StorePathWithOutputs
std::pair<std::string_view, StringSet> parsePathWithOutputs(std::string_view s);
+class Store;
+
+/* Split a string specifying a derivation and a set of outputs
+ (/nix/store/hash-foo!out1,out2,...) into the derivation path
+ and the outputs. */
+StorePathWithOutputs parsePathWithOutputs(const Store & store, std::string_view pathWithOutputs);
+
+StorePathWithOutputs followLinksToStorePathWithOutputs(const Store & store, std::string_view pathWithOutputs);
+
}