Conversation
d2c4405 to
281f6a8
Compare
281f6a8 to
d2227af
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2025-07-16-nix-team-meeting-minutes-235/66850/1 |
This was carefully refactored by inlining some Nixpkgs definitions like `generateSplicesForMkScope`, so the memoization properties should remain the same.
Users can access these through the `lib.makeComponents` return value, so it's helpful to briefly explain some of them. This doesn't replace `meta.description`, but supplements it. (TODO: improve `meta.description`)
We should keep users' pkgs tidy.
d2227af to
9b9e49e
Compare
xokdvium
left a comment
There was a problem hiding this comment.
Won't pretend that I understand all the splicing nuances, but this seems like a great step in the right direction. For one, this will be very useful for our GHA CI. I really like that we'd be able to do (dummy example for simplicity):
lib.makeComponents { pkgs = import <nixpkgs> { }; getStdenv = pkgs: pkgs.clangStdenv; }).overrideScope (_: _: { mesonComponentOverrides = finalAttrs: prevAttrs: { env.CXXFLAGS = "-ftime-trace"; }; }Just for a single GHA job to measure compile times with ClangBuildAnalyzer. I suppose there are countless other applications for this as well. Having a single entry-point to the package set will really allow us the clean up the checks as well as hydraJobs when we need to build with sanitizers and other overrides.
xokdvium
left a comment
There was a problem hiding this comment.
Paths for components that don't depend on fineVersion are the same for cross. NIX_SHOW_STATS are also basically the same, so LGTM.
Motivation
Cross packaging shouldn't depend on having and using overlay.
This PR makes it possible to cross-compile without using any overlays whatsoever.
The three helper functions could perhaps be moved to Nixpkgs lib. cc @Ericson2314
See also commit messages.
Context
The packaging problems in hydra and flake.lock: Update Nixpkgs #13010 motivated me to try improve this again.
This must have been my third attempt at this. I had previously got stuck on a Nixpkgs quirk; see comment at
fixup =.Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.