mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
BuildResult: Serialize builtOutputs
This commit is contained in:
parent
c32441f207
commit
bc3a847784
1 changed files with 8 additions and 1 deletions
|
@ -32,7 +32,14 @@ void to_json(nlohmann::json & json, const KeyedBuildResult & buildResult)
|
|||
[&](const DerivedPathOpaque & opaque) { path["opaque"] = opaque.path.to_string(); },
|
||||
[&](const DerivedPathBuilt & drv) {
|
||||
path["drvPath"] = drv.drvPath->getBaseStorePath().to_string();
|
||||
path["outputs"] = drv.outputs.to_string();
|
||||
path["outputs"] = drv.outputs;
|
||||
auto outputs = nlohmann::json::object();
|
||||
for (auto & [name, output] : buildResult.builtOutputs)
|
||||
outputs[name] = {
|
||||
{"path", output.outPath.to_string()},
|
||||
{"signatures", output.signatures},
|
||||
};
|
||||
json["builtOutputs"] = std::move(outputs);
|
||||
},
|
||||
},
|
||||
buildResult.path.raw());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue