mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
Fix mutability check
This commit is contained in:
parent
939bee06cd
commit
160b974fb0
1 changed files with 3 additions and 2 deletions
|
@ -193,10 +193,11 @@ static FlakeSourceInfo fetchFlake(EvalState & state, const FlakeRef flakeRef, bo
|
|||
FlakeRef fRef = lookupFlake(state, flakeRef,
|
||||
impureIsAllowed ? state.getFlakeRegistries() : std::vector<std::shared_ptr<FlakeRegistry>>());
|
||||
|
||||
if (evalSettings.pureEval && !impureIsAllowed && !fRef.isImmutable())
|
||||
throw Error("requested to fetch mutable flake '%s' in pure mode", fRef.to_string());
|
||||
|
||||
// This only downloads only one revision of the repo, not the entire history.
|
||||
if (auto refData = std::get_if<FlakeRef::IsGitHub>(&fRef.data)) {
|
||||
if (evalSettings.pureEval && !impureIsAllowed && !fRef.isImmutable())
|
||||
throw Error("requested to fetch FlakeRef '%s' purely, which is mutable", fRef.to_string());
|
||||
|
||||
// FIXME: use regular /archive URLs instead? api.github.com
|
||||
// might have stricter rate limits.
|
||||
|
|
Loading…
Reference in a new issue