-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
nixos/manual: clarify declarative packages section #57617
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
Conversation
Hm, what about this instead? After this code example:
place
A note about |
29c5858
to
0258cff
Compare
The HEAD commit formerly did not have the content it's description implied (rather it was just a revert commit iirc). I have force pushed [1] to make the commit match your suggestion @danbst [1] I assume that's acceptable because as far as I know, I'm the only one checking out this branch |
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.
Looks OK to me, I wish @AMDphreak have verified that this indeed clarifies section.
Let me know if I read this right: the Suggested modification:
I'm thinking readers will interpret the word "variable" as the meaning of "variable" from the procedural programming paradigm (stored value), rather than the functional paradigm ("let" binding). The reader needs to be introduced to the nomenclature of let-bound variables when he/she first encounters the concept. The "alias" or "pointer" metaphor seems like a natural way to explain it. My sentence before my suggested modification would be a succinct way to let users know there's a difference. It's fairly unambiguous without getting too technical and jargony. The use of "He-who-should-not-be-named" to refer to Voldemort in Harry Potter should be a good analogy, especially since Voldemort refers to another name, Tom Riddle, as well (the irony!).
Is the |
It's possible to define as for variable thing: I really really wish we had documentation with ability to add comments in-place to each section. Like Google Docs annotations, or Mercurial book (which has comments to each paragraph).
correct!
That depends on reader. I like to think about let-bindings as immutable variables, because you can reassign them whenever you want. But I also like your suggestion. |
Motivation for this change
The declarative package management gives a straightforward explaination of installing packages in NixOS, but assumes knowledge of Nix variables and knowledge of channels.
This leads to confusions such as #55556, where a user confused
nixos
andpkgs
as almost interchangable.This pull request elaborates on what the
pkgs
variable means (it's a reference to the root channel) and what thenixos
prefix in a full package path means (it's the channel you are getting the package from).This should allow a user to use the variable
pkgs
and thenixos
prefix without needing an explaination of what they mean.Although it doesn't explain what a channel is, it hopefully makes sense without knowing the full definition, and if a user is confused, they should have a clear question to ask (i.e. "what is a channel?").
Things done
on NixOS, or option
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)