mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Don't update the global registry when building a locked flake
It's unnecessary and slows things down (e.g. when you're on a Thalys with super-crappy Internet).
This commit is contained in:
parent
d132d057a8
commit
aa2846198f
2 changed files with 7 additions and 2 deletions
|
@ -119,7 +119,9 @@ static FlakeRef lookupFlake(EvalState & state, const FlakeRef & flakeRef, const
|
|||
static SourceInfo fetchFlake(EvalState & state, const FlakeRef & flakeRef, bool impureIsAllowed = false)
|
||||
{
|
||||
FlakeRef resolvedRef = lookupFlake(state, flakeRef,
|
||||
impureIsAllowed ? state.getFlakeRegistries() : std::vector<std::shared_ptr<FlakeRegistry>>());
|
||||
impureIsAllowed && !flakeRef.isDirect()
|
||||
? state.getFlakeRegistries()
|
||||
: std::vector<std::shared_ptr<FlakeRegistry>>());
|
||||
|
||||
if (evalSettings.pureEval && !impureIsAllowed && !resolvedRef.isImmutable())
|
||||
throw Error("requested to fetch mutable flake '%s' in pure mode", resolvedRef);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue