-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
treewide: update mainProgram docs #247130
Conversation
lib/meta.nix
Outdated
@@ -132,8 +132,7 @@ rec { | |||
{ shortName = licstr; } | |||
); | |||
|
|||
/* Get the path to the main program of a derivation with either | |||
meta.mainProgram or pname or name | |||
/* Get the path to the main program of a derivation meta.mainProgram |
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 don't think the doc should include deprecated behaviour?
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.
/* Get the path to the main program of a derivation meta.mainProgram | |
/* Get the path to the main program of a package based on meta.mainProgram |
- added "based on"
- derivation -> package, because the builder is also a main program
Derivations are just how we build packages, and the attrset returned by mkDerivation
is a representation of the package in context.
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.
Suggestion and lgtm
lib/meta.nix
Outdated
@@ -132,8 +132,7 @@ rec { | |||
{ shortName = licstr; } | |||
); | |||
|
|||
/* Get the path to the main program of a derivation with either | |||
meta.mainProgram or pname or name | |||
/* Get the path to the main program of a derivation meta.mainProgram |
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.
/* Get the path to the main program of a derivation meta.mainProgram | |
/* Get the path to the main program of a package based on meta.mainProgram |
- added "based on"
- derivation -> package, because the builder is also a main program
Derivations are just how we build packages, and the attrset returned by mkDerivation
is a representation of the package in context.
``` nix-repl> lib.getExe (pass.withExtensions(_: [])) "/nix/store/rvc4ambjr8jsvm5n757icfl3j7gv1jxh-pass-env/bin/pass" ```
|
||
Type: getExe :: derivation -> string | ||
Type: getExe :: package -> string |
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.
@roberth changed the type too
Description of changes
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)