1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-03 02:01:48 +02:00

Merge pull request #7485 from fricklerhandwerk/doc-store-derivation

define "store derivation"
This commit is contained in:
Théophane Hufschmitt 2023-01-02 13:26:41 +01:00 committed by GitHub
commit cfd6c7fc9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 67 additions and 29 deletions

View file

@ -168,7 +168,7 @@ SourceExprCommand::SourceExprCommand(bool supportReadOnlyMode)
addFlag({
.longName = "derivation",
.description = "Operate on the store derivation rather than its outputs.",
.description = "Operate on the [store derivation](../../glossary.md#gloss-store-derivation) rather than its outputs.",
.category = installablesCategory,
.handler = {&operateOn, OperateOn::Derivation},
});

View file

@ -115,12 +115,12 @@ the Nix store. Here are the recognised types of installables:
* **Store derivations**: `/nix/store/p7gp6lxdg32h4ka1q398wd9r2zkbbz2v-hello-2.10.drv`
Store derivations are store paths with extension `.drv` and are a
low-level representation of a build-time dependency graph used
internally by Nix. By default, if you pass a store derivation to a
`nix` subcommand, it will operate on the *output paths* of the
derivation. For example, `nix path-info` prints information about
the output paths:
Store derivations are a low-level, internal representation of build tasks in Nix, and have store paths with extension `.drv`.
By default, if you pass the path to a store derivation to a `nix` subcommand, the command will operate on the [output path]s of the derivation.
[output path]: ../../glossary.md#gloss-output-path
For example, `nix path-info` prints information about the output paths:
```console
# nix path-info --json /nix/store/p7gp6lxdg32h4ka1q398wd9r2zkbbz2v-hello-2.10.drv
@ -202,9 +202,11 @@ operate are determined as follows:
a command like `nix shell nixpkgs#libxml2` will provide only those
two outputs by default.
Note that a store derivation (given by `.drv` file store path) doesn't have
Note that a [store derivation] (given by its `.drv` file store path) doesn't have
any attributes like `meta`, and thus this case doesn't apply to it.
[store derivation]: ../../glossary.md#gloss-store-derivation
* Otherwise, Nix will use all outputs of the derivation.
# Nix stores

View file

@ -68,7 +68,9 @@ R""(
]
```
* Print the path of the store derivation produced by `nixpkgs#hello`:
* Print the path of the [store derivation] produced by `nixpkgs#hello`:
[store derivation]: ../../glossary.md#gloss-store-derivation
```console
# nix path-info --derivation nixpkgs#hello

View file

@ -2,9 +2,11 @@ R""(
# Examples
* Show the store derivation that results from evaluating the Hello
* Show the [store derivation] that results from evaluating the Hello
package:
[store derivation]: ../../glossary.md#gloss-store-derivation
```console
# nix show-derivation nixpkgs#hello
{
@ -37,7 +39,7 @@ R""(
# Description
This command prints on standard output a JSON representation of the
store derivations to which *installables* evaluate. Store derivations
[store derivation]s to which *installables* evaluate. Store derivations
are used internally by Nix. They are store paths with extension `.drv`
that represent the build-time dependency graph to which a Nix
expression evaluates.

View file

@ -18,7 +18,9 @@ R""(
(The flag `--substituters ''` avoids querying
`https://cache.nixos.org` for the log.)
* To copy the log for a specific store derivation via SSH:
* To copy the log for a specific [store derivation] via SSH:
[store derivation]: ../../glossary.md#gloss-store-derivation
```console
# nix store copy-log --to ssh-ng://machine /nix/store/ilgm50plpmcgjhcp33z6n4qbnpqfhxym-glibc-2.33-59.drv