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:
parent
515b908690
commit
39a783ffff
3 changed files with 4 additions and 0 deletions
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue