Nix (package manager)/zh: Difference between revisions

Weijia (talk | contribs)
No edit summary
Weijia (talk | contribs)
No edit summary
Tags: Mobile edit Mobile web edit
Line 68: Line 68:
=== 沙盒化 ===
=== 沙盒化 ===


当沙盒构建被启用, Nix会为每个构建程设置一个孤立的环境.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.
启用沙盒构建时,Nix 会为每个构建程设置一个隔离的环境。这样可以去除构建环境中额外的隐藏依赖,以提高可复现性。这包括在构建过程中禁止访问 <code>fetch*</code> 函数之外的网络,以及禁止访问 Nix store 之外的文件。根据操作系统的不同,对其他资源的访问也会被阻止(例如在 Linux 上进程间通信会被隔离);详细信息请参阅 Nix 手册中的 [https://nixos.org/nix/manual/#sec-conf-file nix.conf 章节]


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