mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
Add 'nix eval' manpage
This commit is contained in:
parent
53ce20eab7
commit
a407d14339
2 changed files with 78 additions and 23 deletions
|
@ -40,30 +40,11 @@ struct CmdEval : MixJSON, InstallableCommand
|
|||
return "evaluate a Nix expression";
|
||||
}
|
||||
|
||||
Examples examples() override
|
||||
std::string doc() override
|
||||
{
|
||||
return {
|
||||
{
|
||||
"To evaluate a Nix expression given on the command line:",
|
||||
"nix eval --expr '1 + 2'"
|
||||
},
|
||||
{
|
||||
"To evaluate a Nix expression from a file or URI:",
|
||||
"nix eval -f ./my-nixpkgs hello.name"
|
||||
},
|
||||
{
|
||||
"To get the current version of Nixpkgs:",
|
||||
"nix eval --raw nixpkgs#lib.version"
|
||||
},
|
||||
{
|
||||
"To print the store path of the Hello package:",
|
||||
"nix eval --raw nixpkgs#hello"
|
||||
},
|
||||
{
|
||||
"To get a list of checks in the 'nix' flake:",
|
||||
"nix eval nix#checks.x86_64-linux --apply builtins.attrNames"
|
||||
},
|
||||
};
|
||||
return
|
||||
#include "eval.md"
|
||||
;
|
||||
}
|
||||
|
||||
Category category() override { return catSecondary; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue