Jump to content

Translations:Flakes/156/zh: Difference between revisions

From Official NixOS Wiki
Weijia (talk | contribs)
Created page with "* <code>builtins.currentSystem</code> 函数是非确定且不纯的,因为它反映了执行推导的主机系统。通常可以通过将系统类型(例如 x86_64-linux)显式传递给需要它的 Derivations 来避免这种情况。"
 
Ardenet (talk | contribs)
No edit summary
 
Line 1: Line 1:
* <code>builtins.currentSystem</code> 函数是非确定且不纯的,因为它反映了执行推导的主机系统。通常可以通过将系统类型(例如 x86_64-linux)显式传递给需要它的 Derivations 来避免这种情况
* <code>builtins.currentSystem</code> 函数是非确定且不纯的,因为它返回的是执行推导的主机系统。通常可以通过将系统类型(例如 x86_64-linux)显式传递给需要它的 Derivations 来避免使用

Latest revision as of 15:49, 3 March 2026

Message definition (Flakes)
* <code>builtins.currentSystem</code> is non-hermetic and impure as it reflects the host system performing the evaluation. This can usually be avoided by passing the system (i.e., x86_64-linux) explicitly to derivations requiring it.
  • builtins.currentSystem 函数是非确定且不纯的,因为它返回的是执行推导的主机系统。通常可以通过将系统类型(例如 x86_64-linux)显式传递给需要它的 Derivations 来避免使用。