-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
doc: lib.composeExtensions reference to overlays #325479
Conversation
1567b85
to
c19bed4
Compare
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.
Have a minor suggestions, and a big thing, which is that extends
is very relevant for the full picture, so I'm proposing to use it in an example instead.
There's probably a few more improvements that can be made now that we have a complete example, but PR suggestions are not great for doing multiple iterations, so I'll have to give the turn to you ;)
lib/fixed-points.nix
Outdated
@@ -341,13 +353,34 @@ rec { | |||
in fApplied // g final prev'; |
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.
prev'
could be gPrev
, or it could be inlined, because the name doesn't really add anything, except an unnecessary pointer in the heap.
Btw much respect for opening this. |
Yeah I also realized that understanding overlays is pretty much impossible on their own without also understanding fix ( and later extends). I just had this idea of a learning path when explaining the concept: Imagine to use overlays like this. (Which is much simpler to understand before bringing in
If your initial doesn't depend on Otherwise we could write
Which is equivalent to
|
13601c2
to
c6a2a7c
Compare
c6a2a7c
to
c865d17
Compare
c865d17
to
126a045
Compare
126a045
to
29da1ba
Compare
f8a8a20
to
6e9e26e
Compare
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.
I hope I didn't go in a circle too much.
My main input is that by referring to overlays instead of writing out all the parameters we can simplify the documentation and make it easier to understand because we don't have to go into a level of detail that doesn't add any new information that wasn't already in the documentation for the overlay signature.
Adding such redundant information could be useful for explanation-type documentation for studying, but this is reference documentation, so it's not the right place for that kind of elaboration.
d5b6584
to
1bacd0a
Compare
1bacd0a
to
316e74a
Compare
316e74a
to
dea395b
Compare
All comments should be addressed by now. |
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.
A few important suggestions to make it more coherent semantically.
Other than those, LGTM. Nice improvement ❤️
Co-authored-by: Robert Hensing <[email protected]>
Thanks! |
Description of changes
packageSet
is not defined, strictly speaking overlays can be used to extend attribute sets.Overlay
is a common term that is now linked into its concept chapter.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.