treewide: {target->host}Platform non-compiler-ish packages#267229
Merged
1 commit merged intomasterfrom Nov 17, 2023
unknown repository
Merged
treewide: {target->host}Platform non-compiler-ish packages#2672291 commit merged intomasterfrom unknown repository
1 commit merged intomasterfrom
unknown repository
Conversation
This was referenced Nov 13, 2023
Member
|
|
ghost
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.
ghost
approved these changes
Nov 17, 2023
Author
Considering all of the above, I am going to self-merge this PR. |
This pull request was closed.
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.
This causes no rebuilds; eval (at least for the hydra jobset) is unaffected.
Description of changes
stdenv.targetPlatformreally shouldn't be used by software that doesn't read, write, or manipulate executables.I reviewed all uses of
targetPlatformoutside ofpkgs/development/compilersandpkgs/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 ofhostandtarget.Findings
Here are the categories covering all the legitimate uses of
stdenv.targetPlatformthat I was able to find:host!=targetuseful 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
pkgsbut outside ofpkgs/development/compilerswhich mentiontargetPlatform. Filtering outpkgs/development/tools/build-managers/,pkgs/top-level/,pkgs/stdenv, andpkgs/build-supportbrings 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.