aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index 552bbd67d..d77d6bad8 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -241,23 +241,6 @@ struct BuildResult
};
-struct StorePathWithOutputs
-{
- StorePath path;
- std::set<std::string> outputs;
-
- StorePathWithOutputs(const StorePath & path, const std::set<std::string> & outputs = {})
- : path(path.clone()), outputs(outputs)
- { }
-
- StorePathWithOutputs(const StorePathWithOutputs & other)
- : path(other.path.clone()), outputs(other.outputs)
- { }
-
- std::string to_string(const Store & store) const;
-};
-
-
class Store : public std::enable_shared_from_this<Store>, public Config
{
public:
@@ -304,7 +287,7 @@ public:
/* 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 parseDrvPathWithOutputs(const string & s);
+ StorePathWithOutputs parsePathWithOutputs(const string & s);
/* Display a set of paths in human-readable form (i.e., between quotes
and separated by commas). */
@@ -323,11 +306,13 @@ public:
Path toStorePath(const Path & path) const;
/* Follow symlinks until we end up with a path in the Nix store. */
- Path followLinksToStore(const Path & path) const;
+ Path followLinksToStore(std::string_view path) const;
/* Same as followLinksToStore(), but apply toStorePath() to the
result. */
- StorePath followLinksToStorePath(const Path & path) const;
+ StorePath followLinksToStorePath(std::string_view path) const;
+
+ StorePathWithOutputs followLinksToStorePathWithOutputs(std::string_view path) const;
/* Constructs a unique store path name. */
StorePath makeStorePath(const string & type,