Modifications to the JSON formats for Derivation and ValidPathInfo#14493
Merged
Ericson2314 merged 3 commits intoNixOS:masterfrom Nov 6, 2025
Merged
Modifications to the JSON formats for Derivation and ValidPathInfo#14493Ericson2314 merged 3 commits intoNixOS:masterfrom
Derivation and ValidPathInfo#14493Ericson2314 merged 3 commits intoNixOS:masterfrom
Conversation
Mic92
reviewed
Nov 6, 2025
src/libstore/derivations.cc
Outdated
| } | ||
| return node; | ||
| }; | ||
| auto drvs = getObject(valueAt(json, "inputDrvs")); |
Member
There was a problem hiding this comment.
Shouldn't be that one different? drvs?
Mic92
approved these changes
Nov 6, 2025
- 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.
18188a3 to
8cc3ede
Compare
cole-h
reviewed
Nov 6, 2025
| 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: |
Member
There was a problem hiding this comment.
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 :)
Member
Author
There was a problem hiding this comment.
Haha
(I should really start running the tool myself for this purpose more :))
32 tasks
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.