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.
Also fix update script so it can find the v8 crate dependency version
Add cmake for building libz-sys (can't link to existing zlib-ng yet)
Add protoc for internal deno libs
Added aarch64-darwin as it's been manually complied and added to
releases since 0.14.0
Removed fetchSubmodules as it couldn't fetch wpt at detached commit
a51d36327febebc8634d7b523a7e620f4ebdbf26. Doesn't seem required for much
other than testing.
Added installCheckPhase
Moved the librusty_v8 stuff within the preBuild phase and changed the
names
Skipped 1.7.X releases as there wasn't an aarch64-linux release of
librusty_v8.a available
nix-prefetch is failing with an error containing
'allow-unsafe-native-code-during-evaluation'.
This change avoids and handles this error so the update still used.
This isn't intended as a permanent fix but it works for now.