mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2025-10-06 00:22:44 +02:00
docs: flake outputs
This commit is contained in:
@@ -67,7 +67,7 @@ of the current flake. There are various types of inputs, as shown in the example
|
||||
}
|
||||
```
|
||||
|
||||
## 参考
|
||||
## References
|
||||
|
||||
- [Flakes Inputs - Nix Manual]
|
||||
|
||||
|
@@ -20,6 +20,8 @@ can include but are not limited to the following:
|
||||
- Other user-defined outputs: These outputs can be defined by the user and may be used by
|
||||
other Nix-related tools.
|
||||
|
||||
See offical doc for details - [Flakes Check - Nix Manual].
|
||||
|
||||
Here's an example excerpt from the NixOS Wiki that demonstrates the structure of the
|
||||
`outputs` section:
|
||||
|
||||
@@ -75,3 +77,11 @@ Here's an example excerpt from the NixOS Wiki that demonstrates the structure of
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## References
|
||||
|
||||
- [Flakes Check - Nix Manual]
|
||||
|
||||
[Flakes Check - Nix Manual]: https://nix.dev/manual/nix/stable/command-ref/new-cli/nix3-flake-check
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
`flake.nix` 中的 `inputs` 是一个 attribute set,用来指定当前 Flake 的依赖,inputs 有很多种
|
||||
类型,举例如下:
|
||||
|
||||
> 详细的例子参见官方文档 [Flakes Inputs - Nix Manual]
|
||||
> 详细的例子参见官方文档 [Flakes Check - Nix Manual]
|
||||
|
||||
```nix
|
||||
{
|
||||
@@ -64,6 +64,6 @@
|
||||
|
||||
## 参考
|
||||
|
||||
- [Flakes Inputs - Nix Manual]
|
||||
- [Flakes Check - Nix Manual]
|
||||
|
||||
[Flakes Inputs - Nix Manual]: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#flake-references
|
||||
[Flakes Check - Nix Manual]: https://nix.dev/manual/nix/stable/command-ref/new-cli/nix3-flake-check
|
||||
|
@@ -19,6 +19,8 @@
|
||||
- 可以通过执行命令 `nix flake init --template <reference>` 使用模板初始化一个 Flake 包
|
||||
- 其他用户自定义的 outputs,可能被其他 Nix 相关的工具使用
|
||||
|
||||
细节详见官方文档 [Flakes Check - Nix Manual].
|
||||
|
||||
NixOS Wiki 中给出的使用案例:
|
||||
|
||||
```nix
|
||||
@@ -73,3 +75,5 @@ NixOS Wiki 中给出的使用案例:
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user