New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
top-level: Duplicate overlaying unless stdenvOverrides comes last #34332
Conversation
The stdenvOverrides overlay is used to bring packages forward during bootstrapping via stdenv.overrides. These packages have already had the overlays applied to them in the previous boostrapping stage. If stdenvOverrides is not last in the overlays stack, all remaining overlays will windup being applied again to these packages. closes NixOS#34086
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great sluething! I'll wait for @nbp's final approval but looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly stdenvOverrides should always be at the end of overlays list in stage.nix. If it is only used to bring packages forward, this could be valid as previous packages will already have the overlays applied to them. I don't know if this is correct, but I'll submit a pull request.
If this work, this means that stdenvOverrides do not take into account the previous overlays applied in the super
stages, which in it-self should probably be considered as a bug.
Also, do we want to even apply overlays to stdenv packages? From my understanding, doing so implies that we would be recompiling everything.
I will approve this commit as this work-around an issue, but be aware that this should not be the definitive solution.
The best solution would be to move stdenvOverrides into all-packages.nix The fact that we override the previous stages should also move to Nixpkgs, by making stages as a form of nesting.
{
stdenvLinux = {
prevStage = {
prevStage = {
};
};
}
}
Not sure I fully understand the "move
I would also note that we would appreciate not having the overlay functionality too artificially limited as we are looking to use it to overlay (potentially quite deeply) HPC packages and tweaks onto the standard nix package set |
Merged as a good stop gap. But let's continue discussing how to make things better. |
The stdenvOverrides overlay is used to bring packages forward during bootstrapping via stdenv.overrides. These packages have already had the overlays applied to them in the previous boostrapping stage. If stdenvOverrides is not last in the overlays stack, all remaining overlays will windup being applied again to these packages.
closes #34086
Motivation for this change
See #34086 and above description.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)