aboutsummaryrefslogtreecommitdiff
path: root/src/nix/flake.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-04-25 14:05:40 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-04-25 14:05:40 +0200
commite6109ec76538f05723863dce5a84a3d4f5a85cb7 (patch)
treeea88960d13861850be6c398fc76281c1cbdb502d /src/nix/flake.cc
parent514117a6bbe892693b868d55abb230bf6ff52040 (diff)
parentd867e1804a39174f21d50095d9e6bc4a87190e16 (diff)
Merge remote-tracking branch 'tweag/fixFlakeList' into flakes
Diffstat (limited to 'src/nix/flake.cc')
-rw-r--r--src/nix/flake.cc13
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);
}
};