diff options
author | Nick Van den Broeck <nick.van.den.broeck666@gmail.com> | 2019-04-17 14:03:04 +0200 |
---|---|---|
committer | Nick Van den Broeck <nick.van.den.broeck666@gmail.com> | 2019-04-25 11:43:16 +0200 |
commit | d867e1804a39174f21d50095d9e6bc4a87190e16 (patch) | |
tree | 29efa61838e1489936211be381c5ecc39dfa20a4 | |
parent | 21d5abfc146bdc69d631d47de2cdcfdd18cc228c (diff) |
Fix printing FlakeList
-rw-r--r-- | src/nix/flake.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc index 6459df019..a25493f79 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -30,9 +30,14 @@ struct CmdFlakeList : StoreCommand, MixEvalArgs stopProgressBar(); - for (auto & registry : registries) - for (auto & entry : registry->entries) - std::cout << entry.first << " " << entry.second << "\n"; + for (auto & entry : registries[0]->entries) + std::cout << entry.first.to_string() << " flags " << entry.second.to_string() << "\n"; + + for (auto & entry : registries[1]->entries) + std::cout << entry.first.to_string() << " user " << entry.second.to_string() << "\n"; + + for (auto & entry : registries[2]->entries) + std::cout << entry.first.to_string() << " global " << entry.second.to_string() << "\n"; } }; @@ -146,7 +151,7 @@ struct CmdFlakeInfo : FlakeCommand, MixJSON, MixEvalArgs, StoreCommand void run(nix::ref<nix::Store> store) override { auto evalState = std::make_shared<EvalState>(searchPath, store); - nix::Flake flake = nix::getFlake(*evalState, FlakeRef(flakeUri), true); + Flake flake = getFlake(*evalState, FlakeRef(flakeUri), true); printFlakeInfo(flake, json); } }; |