Open
Conversation
Re-evaluating all attributes can significantly increase the memory consumption of `nix build` by several GB during the entire runtime of the process and also can take some time for large reviews. The required derivations are already known from `multi_system_eval`, so pass them directly to `nix build`. Sadly, we can't pass derivations or store paths directly to `mkShell`/`nix-shell`, so we need to turn the required outputs to store paths with `builtins.storePath` and pass them to `mkShell`.
Mic92
reviewed
Mar 23, 2026
| f.write(f' "{attr}"\n') | ||
| f.write(" ];\n") | ||
| f.write("}") | ||
| outputs_file = cache_dir.joinpath("outputs.json") |
Owner
There was a problem hiding this comment.
We also need a gcroot for derivations on top, if we go with this. Both nix-eval-jobs and nix-instantiate have flags for gcroots for derivations.
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.
Re-evaluating all attributes can significantly increase the memory consumption of
nix buildby several GB during the entire runtime of the process and also can take some time for large reviews.The required derivations are already known from
multi_system_eval, so pass them directly tonix build.Sadly, we can't pass derivations or store paths directly to
mkShell/nix-shell, so we need to turn the required outputs to store paths withbuiltins.storePathand pass them tomkShell.