- Use rec-less, overlay-style overridable recursive attributes (in effect since
NixOS#119942);
- Add decoration hooks over installCheckPhase
- Use doInstallCheck instead of doCheck.
- Directly sets env.ZIG_GLOBAL_CACHE_DIR instead of using preBuild
- Add meta.changelog
Relevant upstream issue: ziglang/zig#14559
The patch is a backport of fixes that landed in zig-master and can
be removed with zig-0.11 release.
Additionally, make sure we link statically against LLVM to avoid
unpleasant runtime surprises originating from mixing static and
dynamic LLVM libraries.
Finally, unbreak Zig 0.10.1 on macOS.
26b9a2f4a1 changes Zig 0.10 to build the
compiler (notably *not* its outputs, at least not by default) with
its baseline CPU target, but we should ideally do it for both versions
to increase reproducibility, as well as increase the number of users who
are able to use Hydra-provided Zig binaries.
This also adds a comment above the flag in 0.10, to explain why we're adding
the flag, as we do with the RPATH one.
See https://github.com/NixOS/nixpkgs/issues/214356 and https://github.com/NixOS/nixpkgs/issues/185665
for further context.
On Linux, upgrade Zig to version 0.10.1.
On macOS/Darwin, Zig version 0.10.1 is broken, so keep 0.9.1.
Several Zig-using packages are broken with Zig version 0.10.1, so pin
those packages to Zig version 0.9.1.