Tags: Mobile edit Mobile web edit |
|
(9 intermediate revisions by the same user not shown) |
Line 29: |
Line 29: |
| === Nix store === | | === Nix store === |
|
| |
|
| <div lang="en" dir="ltr" class="mw-content-ltr">
| | {{Split|reason=nix store 在概念上有足够的独立性,值得单独成文。}} |
| {{Split|reason=The nix store is conceptually separate enough that it warrants a separate article.}} | |
| </div>
| |
|
| |
|
| <div lang="en" dir="ltr" class="mw-content-ltr">
| | 由 Nix 构建的软件包会被放置在只读的 ''Nix store'' 中,通常位于 <code>/nix/store</code>。每个软件包都会被赋予一个唯一的地址,该地址由加密哈希值、软件包名称和版本组成,例如 <code>/nix/store/nawl092prjblbhvv16kxxbk6j9gkgcqm-git-2.14.1</code>。这些前缀对构建过程中的所有输入进行哈希,包括源文件、完整的依赖树、编译器参数等。这使得 Nix 能够同时安装同一软件包的不同版本,甚至是同一版本的不同构建(例如使用不同编译器构建的变体)。在添加、移除或更新软件包时,存储中的内容不会被删除;相反,''profiles'' 中指向这些软件包的符号链接会被添加、移除或更改。 |
| Packages built by Nix are placed in the read-only ''Nix store'', normally found in <code>/nix/store</code>. Each package is given a unique address specified by a cryptographic hash followed by the package name and version, for example <code>/nix/store/nawl092prjblbhvv16kxxbk6j9gkgcqm-git-2.14.1</code>. These prefixes hash all the inputs to the build process, including the source files, the full dependency tree, compiler flags, etc. This allows Nix to simultaneously install different versions of the same package, and even different builds of the same version, for example variants built with different compilers. When adding, removing or updating a package, nothing is removed from the store; instead, symlinks to these packages are added, removed or changed in ''profiles''.
| |
| </div>
| |
|
| |
|
| <div lang="en" dir="ltr" class="mw-content-ltr"> | | <span id="Cleaning_the_Nix_store"></span> |
| ==== Cleaning the Nix store ==== | | ==== 清理 Nix store ==== |
| </div>
| |
|
| |
|
| <div lang="en" dir="ltr" class="mw-content-ltr">
| | 有关清理 Nix store 的信息,请参阅 {{NixOS Manual|name=NixOS 手册:章节 - 清理 Nix 存储|anchor=#sec-nix-gc}}。 |
| For information relating to cleaning the Nix store, refer to {{NixOS Manual|name=NixOS Manual: Chapter - Cleaning the Nix Store|anchor=#sec-nix-gc}}.
| |
| </div>
| |
|
| |
|
| <div lang="en" dir="ltr" class="mw-content-ltr"> | | <span id="Nix_store_corruption"></span> |
| ==== Nix store corruption ==== | | ==== Nix store 损坏 ==== |
| </div>
| |
|
| |
|
| <div lang="en" dir="ltr" class="mw-content-ltr">
| | 有关修复 Nix store 损坏的信息,请参阅 {{NixOS Manual|name=NixOS 手册:章节 - Nix store 损坏|anchor=#sec-nix-store-corruption}}。 |
| For information relating to fixing a corrupted Nix store, refer to {{NixOS Manual|name=NixOS Manual: Chapter - Nix Store Corruption|anchor=#sec-nix-store-corruption}}.
| |
| </div>
| |
|
| |
|
| <div lang="en" dir="ltr" class="mw-content-ltr"> | | <span id="Valid_Nix_store_names"></span> |
| ==== Valid Nix store names ==== | | ==== 有效的 Nix store 名称 ==== |
| </div>
| |
|
| |
|
| <div lang="en" dir="ltr" class="mw-content-ltr">
| |
| {{main|Valid Nix store path names}} | | {{main|Valid Nix store path names}} |
| </div>
| |
|
| |
|
| === Profiles === | | === Profiles === |
Line 88: |
Line 75: |
| 早期的尝试可以在 [https://riir-nix.github.io/ riir-nix] 找到。 | | 早期的尝试可以在 [https://riir-nix.github.io/ riir-nix] 找到。 |
|
| |
|
| <div lang="en" dir="ltr" class="mw-content-ltr">
| | == 备注 == |
| ==Notes==
| |
| <references /> | | <references /> |
| </div>
| |
|
| |
|
|
| |
|
| <div lang="en" dir="ltr" class="mw-content-ltr">
| |
| [[Category:Pedias]] | | [[Category:Pedias]] |
| [[Category:Nix]] | | [[Category:Nix]] |
| [[Category:Incomplete]] | | [[Category:Incomplete]] |
| [[Category:Software]] | | [[Category:Software]] |
| </div>
| |