Move addRegistrOverrides

This commit is contained in:
Eelco Dolstra 2019-10-08 16:44:09 +02:00
parent 21304c11f9
commit a0bd088d84
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 3 additions and 4 deletions

View file

@ -52,8 +52,6 @@ struct CmdBuild : MixDryRun, MixProfile, InstallablesCommand
{
auto buildables = build(store, dryRun ? DryRun : Build, installables);
auto evalState = std::make_shared<EvalState>(searchPath, store);
evalState->addRegistryOverrides(registryOverrides);
if (dryRun) return;
if (outLink != "") {

View file

@ -129,7 +129,6 @@ struct CmdFlakeDeps : FlakeCommand
void run(nix::ref<nix::Store> store) override
{
auto evalState = getEvalState();
evalState->addRegistryOverrides(registryOverrides);
std::queue<ResolvedFlake> todo;
todo.push(resolveFlake());

View file

@ -56,8 +56,10 @@ SourceExprCommand::SourceExprCommand()
ref<EvalState> EvalCommand::getEvalState()
{
if (!evalState)
if (!evalState) {
evalState = std::make_shared<EvalState>(searchPath, getStore());
evalState->addRegistryOverrides(registryOverrides);
}
return ref<EvalState>(evalState);
}