Created: 2019-10-09 Wed 14:01
crossAttrs args.crossSystem and localSystem mechanisms.system)<arch>-<os>x86_64-linuxx86_64-darwinaarch64-linuxi686-windowsarm-noneconfig)<arch>-<vendor>-<os>-<libc>x86_64-unknown-linux-gnux86_64-apple-darwinaarch64-unknown-linux-musli686-pc-mingw32arm-none-eabilibc is optional on systems where there is only one standard
Libc.linux-gnu was used by
GNU people to emphasize GNU/Linux. The gnu part was retconned
later on to mean GNU Libc. We now have two other Libcs that work
on Linux: Bionic (linux-android) and Musl (linux-musl).--build (stdenv.buildPlatform)
--host (stdenv.hostPlatform)
--target (stdenv.targetPlatform)
--target is
still needed to prevent adding a special case for building toolchain
compilation.--build and
--target.--build == --host == --target
--build /= --host == --target
--build /= --host /= --target
--build == --host /= --target
(import <nixpkgs> {
crossSystem = "aarch64-unknown-linux-musl";
}).buildPackages.buildPackages.gcc
(import <nixpkgs> {
crossSystem = "aarch64-unknown-linux-musl";
}).buildPackages.gcc
(import <nixpkgs> {
crossSystem = "aarch64-unknown-linux-musl";
}).gcc
--build, --build) - depsBuildBuild--build, --host) - nativeBuildInputs--build, --target) - depsBuildTarget--host, --host) - depsHostHost--host, --target) - buildInputs--target, --target) - depsTargetTarget
dontDisableStatic. This could be added to an overlay so that
everything in the package set builds statically.overlays applies things to our entire toolchain and everything
that depends on it.crossOverlays applies an overlay to just the last package set in
cross compilation. This means the amount of things we have to
rebuild is limited to just runtime dependencies of static packages.pkgsStatic to build arbitrary packages
statically.strictDeps is used only when cross-compiling to tell the Nixpkgs
setup script to only include things in the PATH which can actually
be executed on the build machine.strictDeps is it makes a significant chance to
how buildInputs and nativeBuildInputs works.
buildInputs
imply depsBuildHost in addition to depsHostTarget.disallowedReferences / allowedReferences - specify what is or
isn’t allowed directly in a packages’ output.disallowedRequisites / allowedRequisites - specify what is or
isn’t allowed in the entire packages’ closure.disallowedReferences to disallow nativeBuildInputs in
the package output in the same way that we disallow buildInputs
from being executed. This prevents nativeBuildInputs from being
used after a package is built.
disallowedReferences =
depsBuildBuild ++ nativeBuildInputs ++ depsBuildTarget
-- (depsHostHost ++ buildInputs ++ depsTargetTarget);
--build, --host, and --target. (#21471)