Translations:Flakes/190/zh
Appearance
}; }</nowiki>|name=flake.nix|lang=nix}}
在上述示例中,您可以看到对该 flake 的描述、指定为某 Github 仓库特定分支的输入(此为 nixos/nixpkgs
仓库的 nixos-unstable
分支)以及一个使用该输入的输出。该输出简单地指定了该 flake 包含一个用于 x86_64 架构名为 hello
的包。即使您的 flake 输出不使用其输入(尽管这在实践中极不可能),其输出仍需要是一个 Nix 函数。
Note: Flakes require you to specify its outputs for each architecture separately. For more information, read the related section below.