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 derived paths #7467

Open
Ericson2314 opened this issue Dec 15, 2022 · 1 comment
Open

Document derived paths #7467

Ericson2314 opened this issue Dec 15, 2022 · 1 comment

Comments

@Ericson2314
Copy link
Member

Ericson2314 commented Dec 15, 2022

The implementation and shorthand syntax allows for multiple output paths, but at as @roberth has pointed out we should document the concept as just being a single path:

Two cases:

  • Opaque Store Path:
    • a single store path:
    • Example: /nix/store/fwc0m6fsccir8zznkl7m8iznv5wsjznw-bash-interactive-5.1-p16/bin/bash
  • Built Store Path:
    • a pair of
      • a drvPath (store path to drv file)
      • *, or a comma-separated lists of output names
    • For a syntax, we separate these two with a ^
    • Examples:
      • /nix/store/z6q1q65r7rxa6dxnqykkfmh1xha2k5ww-bash-interactive-5.1-p16.drv^*
      • /nix/store/z6q1q65r7rxa6dxnqykkfmh1xha2k5ww-bash-interactive-5.1-p16.drv^out
      • /nix/store/z6q1q65r7rxa6dxnqykkfmh1xha2k5ww-bash-interactive-5.1-p16.drv^out,dev

Where does it show up:

  1. (user visible!) Command line, the most basic type of "installable"
  2. Dependencies of derivations are derived paths
  3. "String context" in the Nix language is a set of derived paths. (Actually has a bit more information in the presence or absence of the = per path element, but that's a very obscure additional bit if information).

Underlying idea is that derived paths represent distilled goals or targets. This is why they are the parameters of many operations (internally and as exposed in the CLI.)

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2022-12-15-documentation-team-meeting-notes-20/24035/1

@olafklingt olafklingt moved this to TODO Content in Nix documentation Mar 12, 2023
@fricklerhandwerk fricklerhandwerk moved this from Topic: Content to ⚖ To Discuss in Nix documentation Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants