-
-
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: init stdenv.mkDerivation doc-comment #343031
Conversation
73dc320
to
96f5fce
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.
Nice. Some phrasing nits from me.
:::{.note} | ||
This is used as the fundamental building block of most other derivation creating functions in Nixpkgs. | ||
|
||
Arguments are transparently forwarded to [`builtins.derivation`](https://nixos.org/manual/nix/stable/expressions/derivations.html#derivations) |
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.
Arguments are transparently forwarded to [`builtins.derivation`](https://nixos.org/manual/nix/stable/expressions/derivations.html#derivations) | |
Arguments are transparently forwarded to [`builtins.derivation`](https://nixos.org/manual/nix/stable/expressions/derivations.html#derivations). |
I'm not sure what this is supposed to mean though. Are all arguments passed through to builtins.derivation
? If so:
Arguments are transparently forwarded to [`builtins.derivation`](https://nixos.org/manual/nix/stable/expressions/derivations.html#derivations) | |
All arguments are also passed through to to the underlying call to [`builtins.derivation`](https://nixos.org/manual/nix/stable/expressions/derivations.html#derivations). |
Otherwise, please clarify.
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.
Arguments are transparently forwarded to [`builtins.derivation`](https://nixos.org/manual/nix/stable/expressions/derivations.html#derivations) | |
Most arguments are forwarded to [`builtins.derivation`](https://nixos.org/manual/nix/stable/expressions/derivations.html#derivations). |
Not all of them.
It'd be good to answer which, but let's not increase the scope of this PR 100-fold, and only discuss generalities for 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.
Also not always verbatim or "transparent" fwiw
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.
This comment was not addressed
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.
Oh, I should have checked. @hsjobeki could you follow up on this?
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.
This is so necessary! ❤️
Before discussing all of the individual arguments, let's describe the function in broad strokes. I've added a suggestion that I think makes for a good introduction to set the stage for all the things that happen the the arguments that do make it into the derivation.
:::{.note} | ||
This is used as the fundamental building block of most other derivation creating functions in Nixpkgs. | ||
|
||
Arguments are transparently forwarded to [`builtins.derivation`](https://nixos.org/manual/nix/stable/expressions/derivations.html#derivations) |
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.
Arguments are transparently forwarded to [`builtins.derivation`](https://nixos.org/manual/nix/stable/expressions/derivations.html#derivations) | |
Most arguments are forwarded to [`builtins.derivation`](https://nixos.org/manual/nix/stable/expressions/derivations.html#derivations). |
Not all of them.
It'd be good to answer which, but let's not increase the scope of this PR 100-fold, and only discuss generalities for now.
It does render markdown, but a limited dialect (plain CommonMark?) |
c3659d6
to
f14a171
Compare
Nice thanks for all the suggestions. |
Thanks! |
Description of changes
Adds initial doc-comment for mkDerivation at the right position.
The nix-repl output look like this,
Unfortunately nix-repl doesnt support markdown rendering thats why it looks a bit clunky.
But if the users shell supports link detection (i.e. vscode does) the user can click on the link directly.
A goal is to factor out the mkDerivation reference docs from stdenv docs and replace each occurence with references, but this is for another PR.
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.