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.
Motivation for this change
stdenv.cross
is a silly attribute that needs to go leaving the well-definedhostPlatform
andtargetPlatform
. This PR doesn't remove it, but changes its definition: before it tracked the target platform which is sometimes more useful for compilers, and now it tracks the host platform which is more useful for everything else. Most usages are libraries, falling in the "everything else" category, so changing the definition makes sense to appease the majority. The few compiler (gcc in particular) uses that exist I remove to usetargetPlatform
--- preserving correctness and becoming more explicit in the process.I would also update the documentation aside mentioning
stdenv.cross
as deprecated, but the definition given actually erroneously assumes this PR is already merged!This is split off from #25047
Things done
I commandeered and old jobset of mine to create http://hydra.nixos.org/jobset/nixpkgs/pr-25194 to test, because I couldn't figure out how to run a hydra job locally. http://hydra.nixos.org/eval/1353037?compare=cross-trunk shows no regressions. Yay!