nix
在release 2.0中引入了“ 最终将所有nix-*
命令替换为更一致且设计更好的用户界面。”没有手册页但是,--help
标志有点简洁,没有任何示例:
$ nix --help
Usage: nix <COMMAND> <FLAGS>... <ARGS>...
...
Note: this program is EXPERIMENTAL and subject to change.
或
$ nix repl --help
Usage: nix repl <FLAGS>... <FILES>...
Summary: start an interactive environment for evaluating Nix expressions.
Flags:
--arg <NAME> <EXPR> argument to be passed to Nix functions
--argstr <NAME> <STRING> string-valued argument to be passed to Nix functions
-I, --include <PATH> add a path to the list of locations used to look up <...> file names
Note: this program is EXPERIMENTAL and subject to change.
帮助部分的底部警告“该程序是实验性的,可能会发生更改”,但是nix
命令示例已经出现(尽管分散在各处) )。参见NixOS手册中的5.3. Modularity,例如:
$ nix repl '<nixpkgs/nixos>'
nix-repl> config.networking.hostName
"mandark"
nix-repl> map (x: x.hostName) config.services.httpd.virtualHosts
[ "example.org" "example.gov" ]
至少找到源文件或开发文档会很有帮助。
答案 0 :(得分:0)
Github回购中的source for the nix-*
commands和source for nix
。 (所有回购链接都固定到最新的2.2.2版本。)
我最好的猜测是,所有文档(除源注释之外)都位于NixOS/nix中,release notes in the Nix manual中。