Handle structured attrs, "export references graph" outside of DerivationBuilder#13769
Merged
Ericson2314 merged 4 commits intoNixOS:masterfrom Aug 20, 2025
Merged
Conversation
Member
Author
|
Ah, I do have a better idea for this. |
da8e7b3 to
5ab4f8b
Compare
DerivationBuilder
5ab4f8b to
94c8677
Compare
xokdvium
reviewed
Aug 19, 2025
xokdvium
reviewed
Aug 19, 2025
94c8677 to
3163ead
Compare
rehank0678
approved these changes
Aug 20, 2025
The first part on `drvOptions.exportReferencesGraph` is the same in both cases. It is just how the information is finally rendered that is different.
As much as I prefer rewriting the parsed rather than unparsed JSON for elegance, this gets in the way of the separation of concerns that I am trying to do. As a practical matter, any rewriting that this did will also be done by the second round of rewriting that remains below, so removing this code should have no effect.
…nBuilder` I think this is a better separation of concerns. `DerivationBuilder` doesn't need to to the final, query-heavy details about how these things are constructed. It just operates on the level of "simple, stupid" files and environment variables.
…onBuilder` Now, `DerivationBuilder` only concerns itself with `finalEnv` and `extraFiles`, in straightforward unconditional code. All the fancy desugaring logic is consolidated in `DerivationBuildingGoal`. We should better share the pulled-out logic with `nix-shell`/`nix develop`, which would fill in some missing features, arguably fixing bugs.
3163ead to
1d3ddb2
Compare
2 tasks
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 each commit for details.
Especially see my regrets in the last commit. I am a bit sad that I wasn't able to make this go "all the way" in fully making the store requests/response happen beforeDerivationBuilderis invoked. I am quite open to other ideas/strategies on this.This new approach I like much better, just need to fix bugs.
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.