diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-12-20 14:02:12 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-12-20 14:02:12 +0000 |
commit | bd96403da6a1181e46a52be7befade0c00f9e743 (patch) | |
tree | 0f66b119acd03c11e2cad776087889b7827261dc /src/nix/build.cc | |
parent | bdc772022766e65fa8ea6d29fff0735529ab47f3 (diff) | |
parent | ec3e20283216374c15843c403363a890221d3fcb (diff) |
Merge remote-tracking branch 'upstream/master' into trustless-remote-builder-simple
Diffstat (limited to 'src/nix/build.cc')
-rw-r--r-- | src/nix/build.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc index 65708e98b..67be4024b 100644 --- a/src/nix/build.cc +++ b/src/nix/build.cc @@ -5,9 +5,11 @@ #include "store-api.hh" #include "local-fs-store.hh" +#include <nlohmann/json.hpp> + using namespace nix; -struct CmdBuild : InstallablesCommand, MixDryRun, MixProfile +struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile { Path outLink = "result"; BuildMode buildMode = bmNormal; @@ -86,6 +88,8 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixProfile }, buildables[i]); updateProfile(buildables); + + if (json) logger->cout("%s", buildablesToJSON(buildables, store).dump()); } }; |