Nix (package manager)/zh-hans: Difference between revisions

Loxodoromy (talk | contribs)
Created page with "{{Split|reason=Nix存储在概念上足够独立,有必要单独成文。}}"
Loxodoromy (talk | contribs)
Created page with "当启用沙盒构建时,Nix会为每个构建过程设置一个隔离的环境。它用于移除构建环境中额外的隐藏依赖,以提高可复现性。这包括在构建过程中禁止<code>fetch*</code>函数之外对网络的访问,和Nix存储之外对文件的访问。根据操作系统的不同,对其他资源的访问也会被阻止(例如,进程间通信在Linux上被隔离);详细信息见Nix手册里的[https://nixos.org/nix/manual/#sec-co..."
Line 57: Line 57:
=== 沙盒化 ===
=== 沙盒化 ===


<div lang="en" dir="ltr" class="mw-content-ltr">
当启用沙盒构建时,Nix会为每个构建过程设置一个隔离的环境。它用于移除构建环境中额外的隐藏依赖,以提高可复现性。这包括在构建过程中禁止<code>fetch*</code>函数之外对网络的访问,和Nix存储之外对文件的访问。根据操作系统的不同,对其他资源的访问也会被阻止(例如,进程间通信在Linux上被隔离);详细信息见Nix手册里的[https://nixos.org/nix/manual/#sec-conf-file nix.conf部分]
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); see [https://nixos.org/nix/manual/#sec-conf-file nix.conf section] in the Nix manual for details.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">