rust: hooks: fix cross compilation#247442
Merged
Conversation
Author
|
@ofborg build pkgsCross.aarch64-multiplatform.python3Packages.adblock |
Author
|
🎉 🎉 🎉 pkgsCross.aarch64-multiplatform.python3Packages.adblock on x86_64-linux — Success 🎉 🎉 🎉 |
This was referenced Aug 26, 2023
alyssais
approved these changes
Sep 10, 2023
Member
alyssais
left a comment
There was a problem hiding this comment.
Thank you! I'd noticed this myself before, but tried and failed to fix it.
Contributor
|
Looks good to me as well |
added 3 commits
September 25, 2023 04:47
Currently there is a state of severe confusion in pkgs/build-support/rust/hooks/ regarding host vs target; right now there is only "host" defined, but whether it means "host" or "target" seems to fluctuate. This commit corrects that, ensuring that all variables come in all three flavors (build, host, target) and are used consistently with the nixpkgs convention. This also fixes the cross-compilation of packages which use `maturinBuildHook` -- hooks go in `nativeBuildInputs` and are phase-shifted backwards by one platform, so they need to be careful about distinguishing between build and host. Closes #247441
alyssais
approved these changes
Sep 25, 2023
12 tasks
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.
Description of changes
Currently there is some confusion in
pkgs/build-support/rust/hooks/regarding host vs target; right now there is only "host" defined, but whether it means "host" or "target" seems to fluctuate.This commit corrects that, ensuring that all variables come in all three flavors (build, host, target) and are used consistently with the nixpkgs convention.
This also fixes the cross-compilation of packages which use
maturinBuildHook-- hooks go innativeBuildInputsand are phase-shifted backwards by one platform, so to them thehostPlatformlooks like it is thetargetPlatform.Closes #247441
Closes #251539
Things done