-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
treewide: {target->host}Platform non-compiler-ish packages #267229
Merged
Merged
Conversation
This file contains 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
This was referenced Nov 13, 2023
|
ehmry
approved these changes
Nov 16, 2023
stdenv.targetPlatform really shouldn't be used by software that doesn't generate or manipulate binaries. I reviewed all uses of targetPlatform outside of pkgs/development/compilers and pkgs/stdenv and replaced those which weren't involved in something which fits these criteria.
ehmry
approved these changes
Nov 17, 2023
Considering all of the above, I am going to self-merge this PR. |
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
6.topic: emacs
Text editor
6.topic: hygiene
6.topic: printing
6.topic: python
8.has: clean-up
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild on Darwin
10.rebuild-linux: 0
This PR does not cause any packages to rebuild on Linux
12.approvals: 1
This PR was reviewed and approved by one reputable person
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.
This causes no rebuilds; eval (at least for the hydra jobset) is unaffected.
Description of changes
stdenv.targetPlatform
really shouldn't be used by software that doesn't read, write, or manipulate executables.I reviewed all uses of
targetPlatform
outside ofpkgs/development/compilers
andpkgs/stdenv
, and replaced those which weren't involved in something which fits these criteria. Nearly all of them appear to have arisen from confusion about the meaning ofhost
andtarget
.Findings
Here are the categories covering all the legitimate uses of
stdenv.targetPlatform
that I was able to find:host!=target
useful only ifhost.canExecute target
)bintools
,patchelf
)gobject-introspection
(technically a compiler, but does not emit machine code)pkg-config
(probably the only legit example)s6-rc-compile
,s6-linux-init
(I may try to upstream a fix for this)After this PR, there are only 65 files in
pkgs
but outside ofpkgs/development/compilers
which mentiontargetPlatform
. Filtering outpkgs/development/tools/build-managers/
,pkgs/top-level/
,pkgs/stdenv
, andpkgs/build-support
brings the number down to 35.Motivation
This PR is part of work towards a theory that the vast majority of nixpkgs ought to be oblivious to
targetPlatform
, and that we will all be happier that way.