1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 20:51:00 +01:00

Merge remote-tracking branch 'detsys/detsys-main' into lazy-trees-v2

This commit is contained in:
Eelco Dolstra 2025-05-06 19:09:09 +02:00
commit 577b331464
52 changed files with 398 additions and 235 deletions

View file

@ -84,9 +84,17 @@ bool EvalSettings::isPseudoUrl(std::string_view s)
std::string EvalSettings::resolvePseudoUrl(std::string_view url)
{
if (hasPrefix(url, "channel:"))
return "https://nixos.org/channels/" + std::string(url.substr(8)) + "/nixexprs.tar.xz";
else
if (hasPrefix(url, "channel:")) {
auto realUrl = "https://nixos.org/channels/" + std::string(url.substr(8)) + "/nixexprs.tar.xz";
static bool haveWarned = false;
warnOnce(haveWarned,
"Channels are deprecated in favor of flakes in Determinate Nix. "
"Instead of '%s', use '%s'. "
"See https://zero-to-nix.com for a guide to Nix flakes. "
"For details and to offer feedback on the deprecation process, see: https://github.com/DeterminateSystems/nix-src/issues/34.",
url, realUrl);
return realUrl;
} else
return std::string(url);
}
@ -103,4 +111,4 @@ Path getNixDefExpr()
: getHome() + "/.nix-defexpr";
}
} // namespace nix
} // namespace nix

View file

@ -179,7 +179,7 @@ static void fetchTree(
}
if (!state.settings.pureEval && !input.isDirect())
input = lookupInRegistries(state.store, input).first;
input = lookupInRegistries(state.store, input, fetchers::UseRegistries::Limited).first;
if (state.settings.pureEval && !input.isLocked()) {
if (input.getNarHash())
@ -202,7 +202,7 @@ static void fetchTree(
throw Error("input '%s' is not allowed to use the '__final' attribute", input.to_string());
}
auto cachedInput = state.inputCache->getAccessor(state.store, input, false);
auto cachedInput = state.inputCache->getAccessor(state.store, input, fetchers::UseRegistries::No);
auto storePath = state.mountInput(cachedInput.lockedInput, input, cachedInput.accessor, true);