-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flake overlays
cannot use __functor
#7349
Comments
This is intended behaviour, see #6404. |
Sorry, I'm not sure how that's related? I'm not saying that nix should do anything special with evaluation or auto-call anything. The point is that functor attrsets themselves ( Plus the error message states |
While I agree with the existing implementation's decision to reject functors; this should get a footnote in the manual explaining why functors are rejected. |
Hm, perhaps the problem really is that But yes, if this is intentionally over-restrictive, the error messages should be improved at the very least. |
Checking that overlays are strictly defined as If you want to use a functor the fix isn't painful :
|
Another noteworthy quality of a "standard" overlay is that it is strictly a thunk from the perspective of the checker when evaluating |
Describe the bug
Using callable attrsets as overlays does not pass
flake check
:Steps To Reproduce
nix flake check
error: overlay does not take an argument named 'final'
Expected behavior
I expect that it would check the
__functor self
instead, and stop complaining!nix-env --version
outputnix-env (Nix) 2.11.0
Additional context
These values are valid as far as nixpkgs is concerned, since it typechecks overlays via
lib.isFunction
(which also accepts functors).The text was updated successfully, but these errors were encountered: