diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-06-21 18:34:43 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-06-21 18:34:43 +0200 |
commit | aa2846198f46c1260a91a6bf21a2f53997f1f274 (patch) | |
tree | 11631c437346fd77b01ab7d2b271f2c8fe7d5b14 /src | |
parent | d132d057a85aa1812c4133feed6c9b34ca70671d (diff) |
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).
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/flake/flake.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc index 215eb85b6..e9db9d80e 100644 --- a/src/libexpr/flake/flake.cc +++ b/src/libexpr/flake/flake.cc @@ -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); |