Jump to content

Translations:Nix (package manager)/16/zh: Difference between revisions

From Official NixOS Wiki
Weijia (talk | contribs)
No edit summary
Ardenet (talk | contribs)
No edit summary
 
Line 1: Line 1:
启用沙盒构建,Nix 为每个构建过程设置一个隔离环境。这样可以去除构建环境中额外的隐藏依赖,以提高可复现性。这包括在构建过程中禁止访问 <code>fetch*</code> 函数之外的网络,以及禁止访问 Nix store 之外的文件。根据操作系统的不同,对其他资源的访问也会被阻止(例如在 Linux 上进程间通信被隔离);详细信息请参阅 Nix 手册中的 [https://nixos.org/nix/manual/#sec-conf-file nix.conf 章节]
启用沙盒构建,Nix 为每个构建过程设置一个隔离环境。这用于移除构建环境中的的其它隐藏依赖,以提高构建结果的可复现性。这包括在构建过程中<code>fetch*</code> 函数之外的网络访问,以及Nix Store 之外的文件访问的不可行。根据操作系统的不同,对其他资源的访问也会被阻止(例如在 Linux 上进程间通信也是被隔离)。

Latest revision as of 09:01, 8 October 2025

Message definition (Nix (package manager))
When sandbox builds are enabled, Nix will setup an isolated environment for each build process. It is used to remove further hidden dependencies set by the build environment to improve reproducibility. This includes access to the network during the build outside of <code>fetch*</code> functions and files outside the Nix store.  Depending on the operating system access to other resources are blocked as well (ex. inter process communication is isolated on Linux).

启用沙盒构建后,Nix 将为每个构建过程设置一个隔离环境。这用于移除构建环境中的的其它隐藏依赖项,以提高构建结果的可复现性。这包括在构建过程中对 fetch* 函数之外的网络访问,以及对 Nix Store 之外的文件访问的不可行。根据操作系统的不同,对其他资源的访问也会被阻止(例如,在 Linux 上,进程间通信也是被隔离的)。