I was so confused after I got this warning when I was still using Determinate Nix. Currently Iām redoing my whole config to use upstream Nix and still got the same error after running the check.
At first I thought it was only related to determinate. I guess I didnāt keep up with the nixpkgs changes until recently lmao
final doesnāt depend on overlay ordering. This makes more sense for stdenv, and especiallystdenv.hostPlatform.system, because you want to get the āfinalā value of those, after all other overlays have been applied. In practice it should rarely make a difference, but itās one of those little details.
Stuff like system and stdenv are involved in bootstrap, so prev.system and prev.stdenv are not things you should rely on.
And in general itās always a best-practice to use final in an overlay, except for obvious infrec scenarios, e.g. for foobar = prev.foobar.override { ... } where youād have to use prev as final would infrec. You want your overlays to actually take effect - final is the nixpkgs instance that ensures that.