diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-03-28 22:59:38 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-03-28 22:59:38 +0100 |
commit | 4989c04dd2795bdd1bc8a6b7336a6e53179eca63 (patch) | |
tree | 8473e23dc8e56177461d1dda22837a605c1b8db5 | |
parent | 2fccef0c59f57ad276a60f6d3ae59dcc36a51027 (diff) |
nix flake info --json: Dump attr-style flakeref
-rw-r--r-- | src/nix/flake.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc index b090ea201..e5aa424b5 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -100,6 +100,8 @@ static nlohmann::json flakeToJson(const Store & store, const Flake & flake) j["description"] = *flake.description; j["edition"] = flake.edition; j["url"] = flake.lockedRef.to_string(); + j["original"] = attrsToJson(flake.originalRef.toAttrs()); + j["locked"] = attrsToJson(flake.lockedRef.toAttrs()); if (auto rev = flake.lockedRef.input->getRev()) j["revision"] = rev->to_string(Base16, false); if (flake.sourceInfo->info.revCount) |