nixpkgs/pkgs/build-support
John Ericson 5f134ec6cf Clean up cross bootstrapping
For a long time, we've had `crossLibcStdenv`, `*Cross` libc attributes,
and `*bsdCross` pre-libc package sets. This was always bad because
having "cross" things is "not declarative": the naming doesn't reflect
what packages *need* but rather how we *provide* something. This is
ugly, and creates needless friction between cross and native building.

Now, almost all of these `*Cross` attributes are gone: just these are
kept:

- Glibc's and Musl's are kept, because those packages are widely used
  and I didn't want to risk changing the native builds of those at this
  time.

- generic `libcCross`, `theadsCross`, and friends, because these relate
  to the convolulted GCC bootstrap which still needs to be redone.

The BSD and obscure Linux or freestnanding libcs have conversely all
been made to use a new `stdenvNoLibc`, which is like the old
`crossLibcStdenv` except:

1. It usable for native and cross alike

2. It named according to what it *is* ("a standard environment without
   libc but with a C compiler"), rather than some non-compositional
   jargon ("the stdenv used for building libc when cross compiling",
   yuck).

I should have done this change long ago, but I was stymied because of
"infinite recursions". The problem was that in too many cases we are
overriding `stdenv` to *remove* things we don't need, and this risks
cyles since those more minimal stdenvs are used to build things in the
more maximal stdenvs.

The solution is to pass `stage.nix` `stdenvNoCC`, so we can override to
*build up* rather than *tear down*. For now, the full `stdenv` is also
passed, so I don't need to change the native bootstraps, but I can see
this changing as we make things more uniform and clean those up.

(adapted from commit 51f1ecaa59)
(adapted from commit 1743662e55)
2024-09-06 10:26:56 -04:00
..
add-driver-runpath addDriverRunpath: init 2023-12-03 07:22:51 -08:00
agda build-support/agda: expose mkLibraryFile 2024-07-04 14:51:30 +02:00
alternatives treewide: simplify exec format conditionals 2024-01-07 17:43:33 -08:00
appimage appimage-run: Expose $APPIMAGE 2024-07-24 15:17:30 +02:00
binary-cache
bintools-wrapper Clean up cross bootstrapping 2024-09-06 10:26:56 -04:00
build-bazel-package
build-fhsenv-bubblewrap buildFHSEnv: replace all chroot occurences with generic names 2024-07-28 22:39:35 +02:00
build-fhsenv-chroot treewide: remove unused with statements from maintainer lists 2024-07-29 10:06:20 +08:00
build-graalvm-native-image buildGraalvmNativeImage: fix UTF-8 encoding issue for JVM dependencies 2024-01-26 11:12:54 +00:00
buildenv build-support/buildenv: Hoist builder instantiation 2023-12-29 03:04:46 +13:00
cc-wrapper Merge pull request #317224 from ju1m/NIX_CFLAGS_COMPILE 2024-07-28 20:18:22 -04:00
compress-drv Merge pull request #332558 from motiejus/compressDrv 2024-08-05 14:58:06 -07:00
coq mkCoqDerivation: fix install path of ML plug-in built w/ dune 2024-06-25 21:07:57 +02:00
dart dartHooks.dartInstallHook: Add trailing newline 2024-01-18 12:17:43 +11:00
deterministic-uname Merge master into staging-next 2024-06-07 00:02:15 +00:00
dev-shell-tools nixosTests.docker-tools-nix-shell: Enable on aarch64-linux 2024-07-29 00:23:05 +02:00
dhall
dlang dub-to-nix,buildDubPackage: allow git-type dependencies 2024-05-08 14:01:35 +02:00
docker streamLayeredImage: add dynamic tagging of docker image (#329425) 2024-07-29 19:45:58 +02:00
dotnet buildDotnetModule: add finalAttrs support 2024-08-06 16:33:49 +01:00
expand-response-params expand-response-params: add description 2024-04-18 20:49:13 +02:00
fake-nss
fetch9front
fetchbitbucket
fetchbower
fetchbzr
fetchcvs
fetchdarcs
fetchdebianpatch
fetchdocker Merge staging-next into staging 2023-10-21 00:02:49 +00:00
fetchfirefoxaddon
fetchfossil fetchfossil: support SRI hashes 2023-11-22 09:47:57 +01:00
fetchgit fetchgit: Support fetching signed tags over dumb http transport 2024-04-22 02:16:02 +02:00
fetchgitea
fetchgithub fetchFromGitHub: fix compatibility issue with nix-prefetch 2024-01-30 12:21:13 +01:00
fetchgitiles
fetchgitlab Merge pull request #268304 from panicgh/fetchgitlab-sparse-forcegit 2023-12-17 03:34:52 +01:00
fetchgitlocal
fetchgx
fetchhg
fetchipfs
fetchmavenartifact
fetchmtn
fetchnextcloudapp fetchNextcloudApp: use fetchurl by default 2024-08-05 03:53:38 -07:00
fetchpatch fetchpatch: add patchutils to nativeBuildInputs 2024-07-01 18:09:00 +03:00
fetchpijul build-support/fetchpijul: Enable strictDeps 2023-12-06 18:40:07 +01:00
fetchpypi
fetchpypilegacy fetchPypiLegacy: Pass cacert to enable TLS verification when username/password is used 2024-08-14 13:22:31 +12:00
fetchrepoorcz
fetchrepoproject Avoid top-level with ...; in pkgs/build-support/fetchrepoproject/default.nix 2024-03-19 22:31:19 +01:00
fetchs3
fetchsavannah
fetchsourcehut Avoid top-level with ...; in pkgs/build-support/fetchsourcehut/default.nix 2024-03-19 22:31:19 +01:00
fetchsvn
fetchsvnrevision
fetchsvnssh
fetchtorrent treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02:00
fetchurl fetchurl: add codemirror.dlang.org to the list of dub mirrors 2024-04-21 18:51:45 +10:00
fetchzip fetchzip: allow dropping unzip 2024-01-12 20:26:16 +01:00
flutter buildFlutterApplication: use the engine 2024-06-14 21:01:19 -07:00
go buildGoPackage: deprecate 2024-07-21 12:50:54 +02:00
icon-conv-tools
install-shell-files
kernel make-initrd-ng: also print json itself if it fails to parse 2024-08-02 10:24:34 +02:00
lib build-support/meson: explicitly use ambiant CMake during cross compilation 2024-05-11 13:32:14 +02:00
libredirect libredirect: use llvmPackages unconditionally 2024-07-13 10:59:41 -04:00
make-darwin-bundle
make-desktopitem make-desktopitem: fix file extension for type directory 2024-07-03 23:23:30 +08:00
make-hardcode-gsettings-patch makeHardcodeGsettingsPatch: Support applying patches 2023-11-21 08:42:47 +01:00
make-pkgconfigitem treewide: Remove indefinite article from meta.description 2024-06-09 23:07:45 +02:00
make-startupitem make-startupitem: add prependExtraArgs and appendExtraArgs 2024-05-30 22:27:15 +02:00
mitm-cache mitm-cache: init at 0.1.1 2024-07-12 18:24:47 +07:00
mkshell doc: add explanatory code comment 2023-11-13 20:59:33 +01:00
mono-dll-fixer
nix-gitignore Avoid top-level with ...; in pkgs/build-support/nix-gitignore/default.nix 2024-03-19 22:31:19 +01:00
node importNpmLock: init fetcherOps per package 2024-08-13 09:38:37 +02:00
nuke-references nuke-references: add meta.mainProgram 2024-01-05 15:04:14 -05:00
ocaml build-support/ocaml: deprecate minimumOCamlVersion (#319907) 2024-06-21 10:29:31 +02:00
oci-tools ociTools.buildContainer: writeReferencesToFile -> writeClosure 2024-03-19 05:30:54 +08:00
php php.packages.composer: do not use buildComposerProject 2024-05-19 22:10:03 +02:00
pkg-config-wrapper pkg-config: set prefixed mainProgram for cross compilation 2024-04-04 14:55:10 -04:00
portable-service
prefer-remote-fetch prefer-remote-fetch: add more fetchers which prefer local builds 2023-11-29 10:25:20 +01:00
references-by-popularity referenceByPopularity: rename in comment writeReferencesToFile -> writeClosure 2024-03-19 05:30:53 +08:00
release Avoid top-level with ...; in pkgs/build-support/release/default.nix 2024-03-19 22:31:19 +01:00
remove-references-to treewide: add meta.mainProgram to packages with a single binary 2024-03-19 03:14:51 +01:00
replace-secret replace-secret: add mainProgram 2023-11-26 16:27:42 +02:00
replace-vars replaceVars: init 2024-08-07 07:27:50 -07:00
rust Merge pull request #304583 from rayanpiro/sparse-protocol 2024-08-03 21:23:13 +08:00
setup-hooks mpiCheckPhaseHook: update to use openmpi-5 compatible parameters 2024-08-12 21:45:24 +02:00
singularity-tools singularity-tools: deprecate build helpers mkLayer and shellScript 2024-08-09 09:15:52 +00:00
src-only Reapply "srcOnly: reflink if possible and preserve attributes" 2024-05-27 13:41:36 +02:00
substitute Merge pull request #291569 from Luflosi/fix-substituteAll-typo 2024-04-04 18:07:15 +08:00
substitute-files
testers Merge pull request #323613 from CyberShadow/fix-nix-path-without-channels-v2 2024-07-28 13:31:10 +02:00
trivial-builders Merge remote-tracking branch 'origin/master' into staging-next 2024-07-26 18:05:04 +02:00
vm vmTools: allow qemu to be overridden via customQemu argument 2024-07-08 19:47:08 +01:00
wrapper-common
writers Merge pull request #334776 from aos/aos/update-writepy3-example 2024-08-15 07:42:45 +02:00
checkpoint-build.nix checkpointBuildTools.prepareCheckpointBuild: stop at install 2024-03-13 20:11:31 +08:00
closure-info.nix closureInfo: handle empty path set explicitly 2023-11-04 09:54:41 +01:00
make-impure-test.nix
plugins.nix
replace-dependency.nix Avoid top-level with ...; in pkgs/build-support/replace-dependency.nix 2024-03-19 22:31:19 +01:00
setup-systemd-units.nix
source-from-head-fun.nix