Tweaks to package.nix (particularly pertinent in cross-compilation context)#293
Merged
zimbatm merged 2 commits intonumtide:mainfrom Dec 10, 2025
Merged
Conversation
In cross-compilation context, ${cargo} refers to target-system cargo,
which means building system-manager forces compilation of llvm, rustc
and cargo for the target architecture, despite none of those ever being
used.
This patch prevents this issue.
With the current setup, despite system-manager exposing `unwrapped`, if one would like to overrideAttrs, one would have to copy-paste the whole wrapper invocation. This patch allows simpler overrides downstream by overriding `unwrapped`.
Member
|
looks good, thanks! |
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.
The first commit solves a very real issue of having to build the whole Rust toolchain for the target system (starting with binutils and llvm) for absolutely no reason (see commit description for details). This issue gives me some amount of grief at the moment, so if we can get it merged that would be absolutely fabulous.
The second commit just fixes a weirdness I've ran into while trying to work around the first one (TL;DR you can't
overrideAttrsbecausebuildRustPackageoutput is hard-coded intorunCommandscript, arguably for no good reason). This one is optional, we can split it off to a separate PR or drop it altogether if it seems controversial.