From 4989c04dd2795bdd1bc8a6b7336a6e53179eca63 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 28 Mar 2020 22:59:38 +0100 Subject: nix flake info --json: Dump attr-style flakeref --- src/nix/flake.cc | 2 ++ 1 file changed, 2 insertions(+) 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) -- cgit v1.2.3