aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/path-with-outputs.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-04-05 09:48:18 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-04-05 09:52:25 -0400
commit9b805d36ac70545fc4c0d863e21e0c2e5f2518a1 (patch)
tree17159577fceae59f879a96789cf1004c7d12fc11 /src/libstore/path-with-outputs.cc
parent9dfb97c987d8b9d6a3d15f016e40f22f91deb764 (diff)
Rename Buildable
Diffstat (limited to 'src/libstore/path-with-outputs.cc')
-rw-r--r--src/libstore/path-with-outputs.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libstore/path-with-outputs.cc b/src/libstore/path-with-outputs.cc
index 2898b8d4f..865d64cf2 100644
--- a/src/libstore/path-with-outputs.cc
+++ b/src/libstore/path-with-outputs.cc
@@ -11,34 +11,34 @@ std::string StorePathWithOutputs::to_string(const Store & store) const
}
-BuildableReq StorePathWithOutputs::toBuildableReq() const
+DerivedPath StorePathWithOutputs::toDerivedPath() const
{
if (!outputs.empty() || path.isDerivation())
- return BuildableReqFromDrv { path, outputs };
+ return DerivedPath::Built { path, outputs };
else
- return BuildableOpaque { path };
+ return DerivedPath::Opaque { path };
}
-std::vector<BuildableReq> toBuildableReqs(const std::vector<StorePathWithOutputs> ss)
+std::vector<DerivedPath> toDerivedPaths(const std::vector<StorePathWithOutputs> ss)
{
- std::vector<BuildableReq> reqs;
- for (auto & s : ss) reqs.push_back(s.toBuildableReq());
+ std::vector<DerivedPath> reqs;
+ for (auto & s : ss) reqs.push_back(s.toDerivedPath());
return reqs;
}
-std::variant<StorePathWithOutputs, StorePath> StorePathWithOutputs::tryFromBuildableReq(const BuildableReq & p)
+std::variant<StorePathWithOutputs, StorePath> StorePathWithOutputs::tryFromDerivedPath(const DerivedPath & p)
{
return std::visit(overloaded {
- [&](BuildableOpaque bo) -> std::variant<StorePathWithOutputs, StorePath> {
+ [&](DerivedPath::Opaque bo) -> std::variant<StorePathWithOutputs, StorePath> {
if (bo.path.isDerivation()) {
// drv path gets interpreted as "build", not "get drv file itself"
return bo.path;
}
return StorePathWithOutputs { bo.path };
},
- [&](BuildableReqFromDrv bfd) -> std::variant<StorePathWithOutputs, StorePath> {
+ [&](DerivedPath::Built bfd) -> std::variant<StorePathWithOutputs, StorePath> {
return StorePathWithOutputs { bfd.drvPath, bfd.outputs };
},
}, p.raw());