Closed Enzime closed 1 day ago
IMHO the new behaviour is better: you should enable an experimental feature before you can use a CLI option that depends on it.
Since this regression is in an experimental feature, I'm inclined to not fix it unless it affects a lot of people.
Yes this happened because the --override-input ...
is processed immediately. Now that the indirect fetcher (the one that uses the registry) is marked as depending on the flakes experimental feature, we need flakes enabled before we can override the input with nixpkgs/*
--override-input
is a flake feature, so it seems reasonable to me that we would require the flakes experimental feature.
The only proper way to still allow the arguments to come out of order would be, instead of immediately processing --override-input
, building up a list of deferred actions and then processing --extra-experimental-features
because anything else in that list. But this is a much larger project and not one the current CLI infrastructure is well set-up to support.
Closing as an acceptable behavior change --- this stuff is experimental, after all. Feel free to reopen if this causes more issues than anticipated.
As of https://github.com/NixOS/nix/commit/89b39520630726b7c48e8cbc065643134352e43d,
--extra-experimental-features "nix-command flakes"
must come before--override-input
:This is a regression as in the previous commit https://github.com/NixOS/nix/commit/bfe1308d3ff7f3dfd4facf4318adcb459e57ece9 this works fine:
Steps to reproduce
experimental-features = nix-command flakes
is not set in/etc/nix/nix.conf
and~/.config/nix/nix.conf
Priorities
Add :+1: to issues you find important.
cc @Ericson2314