1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

Merge pull request #6233 from flox/nix-repl-flakes

Nix repl flakes
This commit is contained in:
Théophane Hufschmitt 2022-06-29 17:59:22 +02:00 committed by GitHub
commit 4c8210095e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 178 additions and 38 deletions

View file

@ -1036,11 +1036,16 @@ InstallablesCommand::InstallablesCommand()
void InstallablesCommand::prepare()
{
installables = load();
}
Installables InstallablesCommand::load() {
Installables installables;
if (_installables.empty() && useDefaultInstallables())
// FIXME: commands like "nix profile install" should not have a
// default, probably.
_installables.push_back(".");
installables = parseInstallables(getStore(), _installables);
return parseInstallables(getStore(), _installables);
}
std::optional<FlakeRef> InstallablesCommand::getFlakeRefForCompletion()