-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow "self" in flake input paths #6535
base: master
Are you sure you want to change the base?
Conversation
I don’t have a very strong opinion on that topic, deferring to @edolstra since he might have one |
No particularly strong opinion here either, but if we create a keyword ( |
@roberth The point was (I thought) that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test case in tests/flakes/flakes.sh
. You may want to rebase before you add it, to avoid conflicts in that file.
We'll also want to disallow the flake to define inputs.self = { ... }
.
fa5c1fb
to
c26fef2
Compare
@roberth OK, that's fair. Except As for disallowing a "self" input, I'm a bit torn because in principle I see no reason why, for example, writing |
Triaged in the Nix Team meeting this morning (n.b. I could not make it): Main takeaway:
Discussion:
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-08-04-nix-team-meeting-minutes-77/31487/1 |
Note that since then we've also accepted Things still to do:
I'll mark this as draft for the time being. Please undraft when it's ready for review. |
Fixes #4931 by making “self” in flake input paths the moral equivalent of “.” in filesystem paths. This takes the lazy approach and interprets any “self” components in the path at parse time.
cc @thufschmitt