Terms and Definitions in Nix Project: Difference between revisions

Sdht0 (talk | contribs)
Remove duplicate header
Sdht0 (talk | contribs)
Copy edit
Line 26: Line 26:
|| <div id="generation"></div>Generation
|| <div id="generation"></div>Generation
|| Nix
|| Nix
|| A revision of a ''user environment'', newly created every time the system is updated (with old ones being preserved until manually removed). Technically, each generation is simply a link to a specific ''user environment'' in the Nix store. This term connotes the cloning and modification of an existing user environment. Nix's environment rollback facilities rely on Generations. The ''current generation'' is a user's currently selected ''user environment'', and is generally selected via the ''active profile'' (which is just a symlink, normally in ''/nix/var/nix/profiles/'').  
|| An instance of a ''user environment''. When a user makes any change to their environment, such as installing or removing packages, a new ''generation'' of the environment is created instead of modifying the environment in-place. This ensures that updates are atomic and the user can easily roll-back to any previous generation if something goes wrong. The ''current generation'' is a user's currently active user profile.
|| [http://nixos.org/nix/manual/#sec-profiles Nix Manual: Profiles]
|| [http://nixos.org/nix/manual/#sec-profiles Nix Manual: Profiles]
|--------
|--------
|| Derivation
|| Derivation
|| Nix
|| Nix
|| A Nix expression which describes a build action. High-level derivations (like the ones describing packages in [[Nixpkgs]]), get evaluated into low-level derivations (called ''store derivations'' &mdash; because they wind up in the ''Nix store''). <code>nix-instantiate</code> is the command which translates high-level derivations into low-level ones. <code>nix-store --realise</code> can then check and finish their build for the ''nix store'', producing ''output path(s)''. <code>nix-build</code> is a user-friendly wrapper for the previous commands. Derivations are analogous to package definitions in other package managers.
|| A Nix expression which describes a build action. Derivations are analogous to package definitions in other package managers. High-level derivations (such as the ones describing packages in [[Nixpkgs]]) get evaluated into low-level derivations (called ''store derivations''), for instance by using the <code>nix-instantiate</code> command. <code>nix-store --realise</code> run the build commands described in the derivation, producing one or more ''output paths''. <code>nix-build</code> is a user-friendly wrapper for the previous two commands.
|| [http://nixos.org/nix/manual/#gloss-derivation Nix Manual: Glossary - Derivation] <br> [http://nixos.org/nix/manual/#ssec-derivation Nix Manual: Derivation]
|| [http://nixos.org/nix/manual/#gloss-derivation Nix Manual: Glossary - Derivation] <br> [http://nixos.org/nix/manual/#ssec-derivation Nix Manual: Derivation]
|--------
|--------
|| Output path
|| Output path
|| Nix
|| Nix
|| A ''store path'' produced by a derivation. These are generally analogous to built packages, or pieces of them.<br><syntaxHighlight lang=shell>ls -ld /nix/store/*-firefox-9*/
|| A ''store path'' produced by a derivation. These are generally analogous to built packages, or pieces of them.
dr-xr-xr-x ... /nix/store/v4b8...3d0w-firefox-92.0/</syntaxHighlight>
<syntaxHighlight lang=shell>
$ ls -ld /nix/store/*-firefox-9*/
dr-xr-xr-x ... /nix/store/v4b8...3d0w-firefox-92.0/
</syntaxHighlight>
|| [http://nixos.org/nix/manual/#ssec-derivation Nix Manual: Derivation]
|| [http://nixos.org/nix/manual/#ssec-derivation Nix Manual: Derivation]
|--------
|--------