Flakes: Difference between revisions
m Minor edits to achieve more consistent formatting |
remove untrue or unqualified statements Tags: Mobile edit Mobile web edit |
||
| Line 1: | Line 1: | ||
'''Nix flakes''' is an [https://nixos.org/manual/nix/stable/contributing/experimental- | '''Nix flakes''' is an [https://nixos.org/manual/nix/stable/contributing/experimental-Features.html experimental feature] that was introduced with Nix 2.4 ([https://nixos.org/manual/nix/unstable/release-notes/rl-2.4.html see release notes]). | ||
====Introduction==== | ====Introduction==== | ||
Nix flakes | Nix flakes enforce a uniform structure for Nix projects, pin versions of their dependencies in a lock file, and make it more convenient to write reproducible Nix expressions. | ||
* A [https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html#description flake] refers to a file-system tree whose root directory contains the Nix file specification called <code>flake.nix</code>. | * A [https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html#description flake] refers to a file-system tree whose root directory contains the Nix file specification called <code>flake.nix</code>. | ||
* The contents of <code>flake.nix</code> file follow a uniform naming schema for declaring packages and their dependencies in the Nix language. | |||
* The contents of <code>flake.nix</code> file follow | * Flakes introduce a [https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#flake-references URL-like syntax] for specifying remote sources. | ||
* Flakes | |||
* To simplify the long URL syntax with shorter names, [https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-registry.html flakes uses a registry] of symbolic identifiers. | * To simplify the long URL syntax with shorter names, [https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-registry.html flakes uses a registry] of symbolic identifiers. | ||
* Flakes also allow for locking references and versions that can then be | * Flakes also allow for locking references and versions that can then be queried and updated programmatically. | ||
* | * An [https://nixos.org/manual/nix/stable/command-ref/new-cli/nix.html experimental command-line interface] accepts flake references for expressions that build, run, and deploy packages. | ||
====Enable flakes temporarily==== | ====Enable flakes temporarily==== | ||