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
Add pkgsCross & pkgsLocal #42874
Add pkgsCross & pkgsLocal #42874
Conversation
also inherit forceSystem for some GNU Hurd stuff
So eventually I'd like to prevent / whitelist packages packages from depending on these attributes, but I'll relent for now. |
As a first step, we can move this into an overlay and have the tarballs job do a build without. |
Why? The concept is clearly useful for some packages (granted, not many of them). |
Yes xbursttools is the only one now using it but it definitely makes sense in that case. |
pkgsCross = lib.mapAttrs (n: crossSystem: | ||
nixpkgsFun { inherit crossSystem; }) | ||
lib.systems.examples; | ||
pkgsLocal = lib.mapAttrs (n: localSystem: |
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.
Please call these something more descriptive (pkgsForOtherSystems
or something). "local" sounds something totally different like these packages won't ever use remote building.
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.
It is just based on crossSystem vs localSystem. I would like to avoid the confusion but not sure how useful it is with a long name like that. Maybe pkgsLocalSystem & pkgsCrossSystem ?
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.
Maybe pkgsForOtherSystems.<example>.{cross,native}
?
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.
Hmmm... maybe. What about pkgsNative instead of pkgsLocal? I guess that would still invite confusion with something like buildPackages though.
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.
Maybe nativePkgsForOtherSystems.<whatever>
and crossPkgsForOtherSystems.<whatever>
?
The use cases I know are roughly:
Also |
@dezgeg That's fine. I guess my fear is people that try to pull the cross tools out from this |
Whatever naming used would be good to settle on quickly to avoid breaking or need for compatibility aliases. Thanks for working on this, all! |
@Ericson2314 Well, requesting upstreams to make major changes to their build systems to have objects built for different architectures built separately isn't something we should do, but rather accommodate what they need. For instance, as an U-Boot developer, let's say I'm hacking on some of the 64-bit Allwinner boards that some day in the future might have parts of the early boot code written in ARM code (thus requiring an ARM compiler) due to space constraints. To me it would be a complete implementation detail whether the early boot code is ARM or aarch64, all that I want or need is that |
@dezgeg Yeah I'm relenting :). For certain compilers I do think it's worth it to change upstream, but yes I completely agree with you for these bare-metal cases where the idea of a single host platform breaks down. |
This was removed in PR #42874.
Motivation for this change
Taken from #42060.