docs: flake outputs

This commit is contained in:
Ryan Yin
2025-06-26 10:38:55 +08:00
parent c07c5a66f9
commit 1dffc77681
4 changed files with 18 additions and 4 deletions

View File

@@ -67,7 +67,7 @@ of the current flake. There are various types of inputs, as shown in the example
}
```
## 参考
## References
- [Flakes Inputs - Nix Manual]

View File

@@ -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

View File

@@ -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

View File

@@ -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 中给出的使用案例:
};
}
```