aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/installables.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-03-01 05:48:01 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-04-05 08:31:37 -0400
commitf7d9f7c3381acef38e4db2bb2f9e0287c289be54 (patch)
tree7e084351125d7ede24e275076d4372f5636dabf4 /src/libcmd/installables.cc
parenta07dc7e0d99d1cd91643c9ecc2b672399471eaf4 (diff)
Pull out Buildable into its own file/header in libnixstore
Diffstat (limited to 'src/libcmd/installables.cc')
-rw-r--r--src/libcmd/installables.cc25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc
index 898e642a5..ca416b9ee 100644
--- a/src/libcmd/installables.cc
+++ b/src/libcmd/installables.cc
@@ -20,31 +20,6 @@
namespace nix {
-nlohmann::json BuildableOpaque::toJSON(ref<Store> store) const {
- nlohmann::json res;
- res["path"] = store->printStorePath(path);
- return res;
-}
-
-nlohmann::json BuildableFromDrv::toJSON(ref<Store> store) const {
- nlohmann::json res;
- res["drvPath"] = store->printStorePath(drvPath);
- for (const auto& [output, path] : outputs) {
- res["outputs"][output] = path ? store->printStorePath(*path) : "";
- }
- return res;
-}
-
-nlohmann::json buildablesToJSON(const Buildables & buildables, ref<Store> store) {
- auto res = nlohmann::json::array();
- for (const Buildable & buildable : buildables) {
- std::visit([&res, store](const auto & buildable) {
- res.push_back(buildable.toJSON(store));
- }, buildable);
- }
- return res;
-}
-
void completeFlakeInputPath(
ref<EvalState> evalState,
const FlakeRef & flakeRef,