From c52ecbbc461cdc9178fecf3248f4148654732633 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Thu, 16 Nov 2023 00:26:32 -0800 Subject: [PATCH 1/5] Document ^ syntax for installables The `^` syntax for installables was added in 404c222444b4c8c60148ccf890cd41611f26b0a0 and e2a4e7aecdd36b586ad9600056d913f7b8dd41f6 but was not added to the manual. This commit documents the syntax for this fifth type of installable. --- doc/manual/src/glossary.md | 23 +++++++++++++++++++++++ src/nix/nix.md | 1 + 2 files changed, 24 insertions(+) diff --git a/doc/manual/src/glossary.md b/doc/manual/src/glossary.md index 07891175a4e..21531732a5a 100644 --- a/doc/manual/src/glossary.md +++ b/doc/manual/src/glossary.md @@ -21,6 +21,24 @@ [store derivation]: #gloss-store-derivation +- [store derivation output reference]{#gloss-store-derivation-output-reference} + + The string resulting from concatenating three things: + + - The path to a [store derivation](#gloss-store-derivation) + - The character `^` + - Either: + - one of the store derivation's [output names](#gloss-output-name) or + - the character `*` + + > **Examples** + > + > `/nix/store/xvni94ndxy75v1wdpshk8k0l75nwyc54-stdenv-linux.drv^*` + > + > `/nix/store/llil5bng8p7203l25mqb5lwdhlaya4d9-bash-5.2-p15.drv^man` + + [store derivation output reference]: #gloss-store-derivation-output-reference + - [instantiate]{#gloss-instantiate}, instantiation Translate a [derivation] into a [store derivation]. @@ -212,6 +230,11 @@ [output]: #gloss-output +- [output name]{#gloss-output-name} + + A string identifier, such as `out` or `man`, given to each output of a derivation. + See [the `outputs` argument to the `derivation` function](@docroot@/language/derivations.md#attr-outputs) for details; the `outputs` argument is a list and each element of this list is an output name. + - [output path]{#gloss-output-path} The [store path] to the [output] of a [derivation]. diff --git a/src/nix/nix.md b/src/nix/nix.md index eb150f03b41..29436caf6cd 100644 --- a/src/nix/nix.md +++ b/src/nix/nix.md @@ -59,6 +59,7 @@ These are command line arguments that represent something that can be realised i The following types of installable are supported by most commands: - [Flake output attribute](#flake-output-attribute) (experimental) +- [Store derivation output reference](../../glossary.md#gloss-store-derivation-output-reference) - [Store path](#store-path) - [Nix file](#nix-file), optionally qualified by an attribute path - [Nix expression](#nix-expression), optionally qualified by an attribute path From 8b9c37a5e97e00106c4daa1727733240ca7b33e3 Mon Sep 17 00:00:00 2001 From: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com> Date: Fri, 17 Nov 2023 04:17:37 +0000 Subject: [PATCH 2/5] Update src/nix/nix.md Co-authored-by: Valentin Gagarin --- src/nix/nix.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nix/nix.md b/src/nix/nix.md index 29436caf6cd..76f754cdacf 100644 --- a/src/nix/nix.md +++ b/src/nix/nix.md @@ -59,7 +59,7 @@ These are command line arguments that represent something that can be realised i The following types of installable are supported by most commands: - [Flake output attribute](#flake-output-attribute) (experimental) -- [Store derivation output reference](../../glossary.md#gloss-store-derivation-output-reference) +- [Store derivation output reference](@docroot@/glossary.md#gloss-store-derivation-output-reference) - [Store path](#store-path) - [Nix file](#nix-file), optionally qualified by an attribute path - [Nix expression](#nix-expression), optionally qualified by an attribute path From 9b4588cd1b5b7d887ce022dc24be9ee023678ba6 Mon Sep 17 00:00:00 2001 From: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com> Date: Fri, 17 Nov 2023 04:17:45 +0000 Subject: [PATCH 3/5] Update doc/manual/src/glossary.md Co-authored-by: Valentin Gagarin --- doc/manual/src/glossary.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/manual/src/glossary.md b/doc/manual/src/glossary.md index 21531732a5a..f54e4cc5e01 100644 --- a/doc/manual/src/glossary.md +++ b/doc/manual/src/glossary.md @@ -29,7 +29,7 @@ - The character `^` - Either: - one of the store derivation's [output names](#gloss-output-name) or - - the character `*` + - the character `*` denoting all outputs of the derivation > **Examples** > From 5eda47a3ba298bf36655a32cdd5a36ecfcf82670 Mon Sep 17 00:00:00 2001 From: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com> Date: Fri, 17 Nov 2023 04:18:01 +0000 Subject: [PATCH 4/5] Update doc/manual/src/glossary.md Co-authored-by: Valentin Gagarin --- doc/manual/src/glossary.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/manual/src/glossary.md b/doc/manual/src/glossary.md index f54e4cc5e01..0847b980507 100644 --- a/doc/manual/src/glossary.md +++ b/doc/manual/src/glossary.md @@ -31,9 +31,15 @@ - one of the store derivation's [output names](#gloss-output-name) or - the character `*` denoting all outputs of the derivation - > **Examples** + > **Example** + > + > Reference to all outputs of a given `stdenv-linux` derivation: > > `/nix/store/xvni94ndxy75v1wdpshk8k0l75nwyc54-stdenv-linux.drv^*` + + > **Example** + > + > Reference to the `man` output of a given `bash-5.2-p15` derivation: > > `/nix/store/llil5bng8p7203l25mqb5lwdhlaya4d9-bash-5.2-p15.drv^man` From 891e75373b9e5b1530d0951693e313f2c309655c Mon Sep 17 00:00:00 2001 From: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com> Date: Fri, 17 Nov 2023 04:18:08 +0000 Subject: [PATCH 5/5] Update doc/manual/src/glossary.md Co-authored-by: Valentin Gagarin --- doc/manual/src/glossary.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/manual/src/glossary.md b/doc/manual/src/glossary.md index 0847b980507..88bb6e76538 100644 --- a/doc/manual/src/glossary.md +++ b/doc/manual/src/glossary.md @@ -23,7 +23,7 @@ - [store derivation output reference]{#gloss-store-derivation-output-reference} - The string resulting from concatenating three things: + The string resulting from the concatenation of: - The path to a [store derivation](#gloss-store-derivation) - The character `^`