Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document <drvPath>^<outputName> syntax for installables #9362

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions doc/manual/src/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
This conversation was marked as resolved.
Show resolved Hide resolved

- 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 `*`
This conversation was marked as resolved.
Show resolved Hide resolved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A plain store derivation path refers to the first output declared for that derivation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm, @fricklerhandwerk did you mean to delete those lines in your suggestion, or did you intend to only add the new line?

> **Examples**
>
> `/nix/store/xvni94ndxy75v1wdpshk8k0l75nwyc54-stdenv-linux.drv^*`
>
> `/nix/store/llil5bng8p7203l25mqb5lwdhlaya4d9-bash-5.2-p15.drv^man`
This conversation was marked as resolved.
Show resolved Hide resolved

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
See also: The store path section of the [installables syntax](@docroot@/command-ref/new-cli/nix.html#store-path), where output references are used.

It'd be good to link or explain what this syntax is a part of and where it's used.

[store derivation output reference]: #gloss-store-derivation-output-reference

- [instantiate]{#gloss-instantiate}, instantiation

Translate a [derivation] into a [store derivation].
Expand Down Expand Up @@ -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].
Expand Down
1 change: 1 addition & 0 deletions src/nix/nix.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
This conversation was marked as resolved.
Show resolved Hide resolved
- [Store path](#store-path)
- [Nix file](#nix-file), optionally qualified by an attribute path
- [Nix expression](#nix-expression), optionally qualified by an attribute path
Expand Down
Loading