aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/derived-path.cc6
-rw-r--r--src/libstore/derived-path.hh20
2 files changed, 13 insertions, 13 deletions
diff --git a/src/libstore/derived-path.cc b/src/libstore/derived-path.cc
index 13833c58e..d38613bd3 100644
--- a/src/libstore/derived-path.cc
+++ b/src/libstore/derived-path.cc
@@ -11,7 +11,7 @@ nlohmann::json DerivedPath::Opaque::toJSON(ref<Store> store) const {
return res;
}
-nlohmann::json DerivedPathWithHints::Built::toJSON(ref<Store> store) const {
+nlohmann::json BuiltPath::Built::toJSON(ref<Store> store) const {
nlohmann::json res;
res["drvPath"] = store->printStorePath(drvPath);
for (const auto& [output, path] : outputs) {
@@ -20,9 +20,9 @@ nlohmann::json DerivedPathWithHints::Built::toJSON(ref<Store> store) const {
return res;
}
-nlohmann::json derivedPathsWithHintsToJSON(const DerivedPathsWithHints & buildables, ref<Store> store) {
+nlohmann::json derivedPathsWithHintsToJSON(const BuiltPaths & buildables, ref<Store> store) {
auto res = nlohmann::json::array();
- for (const DerivedPathWithHints & buildable : buildables) {
+ for (const BuiltPath & buildable : buildables) {
std::visit([&res, store](const auto & buildable) {
res.push_back(buildable.toJSON(store));
}, buildable.raw());
diff --git a/src/libstore/derived-path.hh b/src/libstore/derived-path.hh
index 7a2fe59de..72304f4fa 100644
--- a/src/libstore/derived-path.hh
+++ b/src/libstore/derived-path.hh
@@ -79,19 +79,19 @@ struct DerivedPath : _DerivedPathRaw {
/**
* A built derived path with hints in the form of optional concrete output paths.
*
- * See 'DerivedPathWithHints' for more an explanation.
+ * See 'BuiltPath' for more an explanation.
*/
-struct DerivedPathWithHintsBuilt {
+struct BuiltPathBuilt {
StorePath drvPath;
std::map<std::string, std::optional<StorePath>> outputs;
nlohmann::json toJSON(ref<Store> store) const;
- static DerivedPathWithHintsBuilt parse(const Store & store, std::string_view);
+ static BuiltPathBuilt parse(const Store & store, std::string_view);
};
-using _DerivedPathWithHintsRaw = std::variant<
+using _BuiltPathRaw = std::variant<
DerivedPath::Opaque,
- DerivedPathWithHintsBuilt
+ BuiltPathBuilt
>;
/**
@@ -109,12 +109,12 @@ using _DerivedPathWithHintsRaw = std::variant<
* paths.
*/
// FIXME Stop using and delete this, or if that is not possible move out of libstore to libcmd.
-struct DerivedPathWithHints : _DerivedPathWithHintsRaw {
- using Raw = _DerivedPathWithHintsRaw;
+struct BuiltPath : _BuiltPathRaw {
+ using Raw = _BuiltPathRaw;
using Raw::Raw;
using Opaque = DerivedPathOpaque;
- using Built = DerivedPathWithHintsBuilt;
+ using Built = BuiltPathBuilt;
inline const Raw & raw() const {
return static_cast<const Raw &>(*this);
@@ -122,8 +122,8 @@ struct DerivedPathWithHints : _DerivedPathWithHintsRaw {
};
-typedef std::vector<DerivedPathWithHints> DerivedPathsWithHints;
+typedef std::vector<BuiltPath> BuiltPaths;
-nlohmann::json derivedPathsWithHintsToJSON(const DerivedPathsWithHints & buildables, ref<Store> store);
+nlohmann::json derivedPathsWithHintsToJSON(const BuiltPaths & buildables, ref<Store> store);
}