1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 14:53:16 +02:00

Require flakes for the -I flake:... feature

This commit is contained in:
Eelco Dolstra 2022-12-01 16:59:18 +01:00
parent 515b908690
commit 39a783ffff
3 changed files with 4 additions and 0 deletions

View file

@ -698,6 +698,8 @@ void callFlake(EvalState & state,
const LockedFlake & lockedFlake,
Value & vRes)
{
settings.requireExperimentalFeature(Xp::Flakes);
auto [lockFileStr, keyMap] = lockedFlake.lockFile.to_string();
auto overrides = state.buildBindings(lockedFlake.nodePaths.size());

View file

@ -805,6 +805,7 @@ std::optional<SourcePath> EvalState::resolveSearchPathElem(const SearchPathElem
}
else if (hasPrefix(elem.second, "flake:")) {
settings.requireExperimentalFeature(Xp::Flakes);
auto flakeRef = parseFlakeRef(elem.second.substr(6), {}, true, false);
debug("fetching flake search path element '%s''", elem.second);
auto [accessor, _] = flakeRef.resolve(store).lazyFetch(store);