forked from lix-project/lix
32f4454b9f
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.
27 lines
654 B
C++
27 lines
654 B
C++
#pragma once
|
|
|
|
#include "path.hh"
|
|
|
|
namespace nix {
|
|
|
|
struct StorePathWithOutputs
|
|
{
|
|
StorePath path;
|
|
std::set<std::string> outputs;
|
|
|
|
std::string to_string(const Store & store) const;
|
|
};
|
|
|
|
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);
|
|
|
|
}
|