Skip to content

manual: document derivation options in the store section - #16261

Merged
Ericson2314 merged 1 commit into
masterfrom
derivation-options-doc-to-store
Aug 5, 2026
Merged

manual: document derivation options in the store section#16261
Ericson2314 merged 1 commit into
masterfrom
derivation-options-doc-to-store

Conversation

@Ericson2314

@Ericson2314 Ericson2314 commented Aug 5, 2026

Copy link
Copy Markdown
Member

Motivation

The various derivation options ("advanced attributes") are concepts of the store layer: they exist on the derivation itself, regardless of which language front-end produced it. Document their semantics in the store section of the manual: a new "Options" section for the whole-derivation options, an "Output checks" section for the per-output checks, and pass as file as part of the environment section.

The language "advanced attributes" page now documents just the Nix-language syntax for setting each option via builtins.derivation, with an example, linking to the store section for the concepts. All its existing anchors are preserved.

Context

Depends on #5538


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

Comment thread doc/manual/source/store/derivation/index.md Outdated
Comment on lines +219 to +220
- [*additional sandbox profile*]{#additional-sandbox-profile}:
(Darwin only) Additional sandbox profile text, granting the build extra permissions inside the sandbox.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we have any docs for the sandbox profile script or is just arcane nonsense that's not documented anywhere?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No idea!

Comment thread doc/manual/source/store/derivation/index.md Outdated
Comment thread doc/manual/source/store/derivation/index.md Outdated
@Ericson2314
Ericson2314 force-pushed the derivation-options-doc-to-store branch from 7fe6c06 to 3ac8fd2 Compare August 5, 2026 21:12
@Ericson2314
Ericson2314 force-pushed the derivation-options-doc-to-store branch from 3ac8fd2 to e799186 Compare August 5, 2026 21:33
@Ericson2314
Ericson2314 enabled auto-merge August 5, 2026 21:33
@Ericson2314
Ericson2314 disabled auto-merge August 5, 2026 21:33
Comment on lines +94 to +98
- [*max size*]{#max-size}:
The size of the output's store object may not exceed the given number of bytes.

- [*max closure size*]{#max-closure-size}:
The total size of the output's closure may not exceed the given number of bytes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can probably be more specific in that it's the length of the NAR serialisation.

@Ericson2314
Ericson2314 force-pushed the derivation-options-doc-to-store branch from e799186 to 82bf944 Compare August 5, 2026 22:07
The various derivation options ("advanced attributes") are concepts of
the store layer: they exist on the derivation itself, regardless of
which language front-end produced it. Document their *semantics* in the
store section of the manual: a new "Options" section for the
whole-derivation options, an "Output checks" section for the per-output
checks, and *pass as file* as part of the environment section.

The language "advanced attributes" page now documents just the
Nix-language syntax for setting each option via `builtins.derivation`,
with an example, linking to the store section for the concepts. All its
existing anchors are preserved.

Documenting the output size checks also required defining the sizes
they constrain. The *NAR size* and *closure NAR size* were referred to
in various places --- `nix path-info`, the store object info JSON
format, the narinfo format --- but only ever defined in passing in the
store object info JSON schema. Define them as store object metadata in
the store section, so the concrete formats can link up to the abstract
concept rather than being the sole source of truth for it.

Co-authored-by: Sergei Zimmerman <sergei@zimmerman.foo>
@Ericson2314
Ericson2314 enabled auto-merge August 5, 2026 22:12
@Ericson2314
Ericson2314 force-pushed the derivation-options-doc-to-store branch from 82bf944 to 237fbce Compare August 5, 2026 22:24
@github-actions github-actions Bot added the new-cli Relating to the "nix" command label Aug 5, 2026
@Ericson2314
Ericson2314 added this pull request to the merge queue Aug 5, 2026
Merged via the queue into master with commit 785fce0 Aug 5, 2026
20 checks passed
@Ericson2314
Ericson2314 deleted the derivation-options-doc-to-store branch August 5, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation new-cli Relating to the "nix" command

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants