Skip to content

Comments

Modifications to the JSON formats for Derivation and ValidPathInfo#14493

Merged
Ericson2314 merged 3 commits intoNixOS:masterfrom
obsidiansystems:drv-and-path-info-new-fmts
Nov 6, 2025
Merged

Modifications to the JSON formats for Derivation and ValidPathInfo#14493
Ericson2314 merged 3 commits intoNixOS:masterfrom
obsidiansystems:drv-and-path-info-new-fmts

Conversation

@Ericson2314
Copy link
Member

Motivation

See the release notes

Context

Effects the behavior of CLI commands.


Add 👍 to pull requests you find important.

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

@Ericson2314 Ericson2314 requested a review from edolstra as a code owner November 6, 2025 19:03
@github-actions github-actions bot added documentation with-tests Issues related to testing. PRs with tests have some priority c api Nix as a C library with a stable interface labels Nov 6, 2025
}
return node;
};
auto drvs = getObject(valueAt(json, "inputDrvs"));
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't be that one different? drvs?

- Use canonical content address JSON format for floating content
  addressed derivation outputs

  This keeps it more consistent.

- Reorganize inputs into nested structure (`inputs.srcs` and
  `inputs.drvs`)

  This will allow for an easier to use, but less compact, alternative
  where `srcs` is just a list of derived paths.

  It also allows for other experiments for derivations with a different
  input structure, as I suspect will be needed for secure build traces.
The old string format is a holdover from the pre JSON days. It is not
friendly to users who need to get the information out of it.

Also introduce the sort of versioning we have for derivation for this
format too.
@Ericson2314 Ericson2314 force-pushed the drv-and-path-info-new-fmts branch from 18188a3 to 8cc3ede Compare November 6, 2025 20:23
@Ericson2314 Ericson2314 enabled auto-merge November 6, 2025 20:36
@Ericson2314 Ericson2314 added this pull request to the merge queue Nov 6, 2025
Merged via the queue into NixOS:master with commit 5b15544 Nov 6, 2025
16 checks passed
@Ericson2314 Ericson2314 deleted the drv-and-path-info-new-fmts branch November 6, 2025 21:51
Must be `3`.
Must be `4`.
This is a guard that allows us to continue evolving this format.
The choice of `3` is fairly arbitrary, but corresponds to this informal version:
Copy link
Member

Choose a reason for hiding this comment

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

You know what time it is...

Suggested change
The choice of `3` is fairly arbitrary, but corresponds to this informal version:
Version history:

(or something :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Haha ♥️

(I should really start running the tool myself for this purpose more :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c api Nix as a C library with a stable interface documentation with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants