Several drivers are built for Darwin on Hydra even though they never
worked and probably never will work there. Mark them as broken to avoid
wasted cycles.
Test was failing on hydra build, with this error:
```
ModuleNotFoundError: No module named 'temp.schema_3'
tests/test_compile_to_code.py:95: ModuleNotFoundError
```
Backport unit test changes from project's master branch to replace
hardcoded /tmp with os.TempDir() calls in Go.
It can now handle /private/tmp/nix-build-{pname}-{version}.drv-0 paths
on Darwin.
With Firefox 100.0 the following deprecation warning comes up:
> The "MACH_USE_SYSTEM_PYTHON" environment variable is deprecated,
> please unset it or replace it with either
> "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system" or
> "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none"
And since we want to continue using our own python we're going for the
system value when the version is at least 100.0.
Thie zip bundle in this output is used in the dumps sent by the
crashreporter. For this to happen we need to upload this zip file to
https://symbols.mozilla.org, which is a separate effort.
This should be a significant disk space saving for most NixOS
installations. This method is a bit more complicated than doing it in
the postInstall for the firmware derivations, but this way it's
automatic, so each firmware package doesn't have to separately
implement its compression.
Currently, only xz compression is supported, but it's likely that
future versions of Linux will additionally support zstd, so I've
written the code in such a way that it would be very easy to implement
zstd compression for those kernels when they arrive, falling back to
xz for older (current) kernels.
I chose the highest possible level of compression (xz -9) because even
at this level, decompression time is negligible. Here's how long it took
to decompress every firmware file my laptop uses:
i915/kbl_dmc_ver1_04.bin 2ms
regulatory.db 4ms
regulatory.db.p7s 3ms
iwlwifi-7265D-29.ucode 62ms
9d71-GOOGLE-EVEMAX-0-tplg.bin 22ms
intel/dsp_fw_kbl.bin 65ms
dsp_lib_dsm_core_spt_release.bin 6ms
intel/ibt-hw-37.8.10-fw-22.50.19.14.f.bseq 7ms
And since booting NixOS is a parallel process, it's unlikely (but
difficult to measure) that the time to user interaction was held up at
all by most of these.
Fixes (partially?) #148197