Nix (package manager): Difference between revisions
m Add navbox |
m Remove dead link |
||
| (One intermediate revision by one other user not shown) | |||
| Line 34: | Line 34: | ||
=== Nix store === <!--T:11--> | === Nix store === <!--T:11--> | ||
<!--T:27--> | |||
{{Split|reason=The nix store is conceptually separate enough that it warrants a separate article.}} | {{Split|reason=The nix store is conceptually separate enough that it warrants a separate article.}} | ||
<!--T:28--> | |||
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''. | 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''. | ||
==== Cleaning the Nix store ==== | ==== Cleaning the Nix store ==== <!--T:29--> | ||
<!--T:30--> | |||
For information relating to cleaning the Nix store, refer to {{NixOS Manual|name=NixOS Manual: Chapter - Cleaning the Nix Store|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}}. | ||
==== Nix store corruption ==== | ==== Nix store corruption ==== <!--T:31--> | ||
<!--T:32--> | |||
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}}. | 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}}. | ||
==== Valid Nix store names ==== | ==== Valid Nix store names ==== <!--T:33--> | ||
<!--T:34--> | |||
{{main|Valid Nix store path names}} | {{main|Valid Nix store path names}} | ||
| Line 58: | Line 63: | ||
<!--T:16--> | <!--T:16--> | ||
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) | 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). | ||
<!--T:17--> | <!--T:17--> | ||