nixpkgs/lib/systems
Alyssa Ross e3e57b8f18 lib.systems: elaborate Rust metadata
We need this stuff to be available in lib so make-derivation.nix can
access it to construct the Meson cross file.

This has a couple of other advantages:

 - It makes Rust less special.  Now figuring out what Rust calls a
   platform is the same as figuring out what Linux or QEMU call it.

 - We can unify the schema used to define Rust targets, and the schema
   used to access those values later.  Just like you can set "config"
   or "system" in a platform definition, and then access those same
   keys on the elaborated platform, you can now set "rustcTarget" in
   your crossSystem, and then access "stdenv.hostPlatform.rustcTarget"
   in your code.

"rustcTarget", "rustcTargetSpec", "cargoShortTarget", and
"cargoEnvVarTarget" have the "rustc" and "cargo" prefixes because
these are not exposed to code by the compiler, and are not
standardized.  The arch/os/etc. variables are all named to match the
forms in the Rust target spec JSON.

The new rust.target-family only takes a list, since we don't need to
worry about backwards compatibility when that name is used.

The old APIs are all still functional with no warning for now, so that
it's possible for external code to use a single API on both 23.05 and
23.11.  We can introduce the warnings once 23.05 is EOL, and make them
hard errors when 23.11 is EOL.
2023-11-09 10:02:24 +01:00
..
architectures.nix lib.systems.architectures: add microarchitecture levels 2023-06-24 00:50:40 -06:00
default.nix lib.systems: elaborate Rust metadata 2023-11-09 10:02:24 +01:00
doubles.nix lib.platforms.mips{,64}-embedded: init 2023-06-30 18:19:00 -07:00
examples.nix lib.systems, test.cross.sanity: add test case for #264989 2023-11-04 05:57:34 +00:00
flake-systems.nix lib: fix typos 2022-12-17 18:59:29 -05:00
inspect.nix lib.systems.inspect: add patternLogicalAnd 2023-11-05 00:55:16 +00:00
parse.nix lib/systems/parse.nix: add, use removeAbiSuffix 2023-10-22 17:05:05 -07:00
platforms.nix lib.systems.bluefield2: remove cpu profile 2023-07-19 13:38:43 +02:00