The architecture is no longer support so we no longer need to
conditionalize metalSupport on isAarch64, nor we need to carry a test
that makes sense only when metal support is off (which was the case on
x86_64-darwin).
Pinned the web UI build to nodejs_latest because the current nodejs lts (v24.15.0)
has an ESM-loader file-descriptor regression (https://github.com/nodejs/node/issues/62012)
that throws EBADF on fstat and, on darwin, aborts the vite/SvelteKit build
with a libuv kqueue assertion.
Assisted-by: Claude Code (Opus 4.8)
Before I added this, I made below benchmark to figure if
it's worth it:
llama-cpp with AVX-512 for faster inference and --quiet patch.
This is MUCH faster than nixpkgs's default x86_64 build,
e.g. reducing the time for a 1024x768 screenshot
(on an AMD Ryzen 7 7700X 8-Core, `llama-cpp` version 8983,
with `gemma-4-E2B-it-Q4_0.gguf` + `mmproj-gemma-4-E2B-it-F16.gguf`):
default AVX2 AVX-512 speedup (AVX2 / AVX-512)
1 thread:
CPU 360s 30s 27s 12x / 13x
wall 293s 22s 19s 13x / 15x
8 threads:
CPU 405s 31s 28s 13x / 14x
wall 51s 6s 6s 8x / 9x
where "AVX2" refers to:
-DGGML_AVX=ON
-DGGML_AVX2=ON
-DGGML_FMA=ON
-DGGML_F16C=ON
-DGGML_AVX512=ON
and "AVX512" refers to additionally:
-DGGML_AVX512_VBMI=ON
-DGGML_AVX512_VNNI=ON
-DGGML_AVX512_BF16=ON
AVX2 is available for CPUs from 2013 (Intel) / 2015 (AMD),
while AVX512 is available for CPUs from 2017 (Intel) / 2022 (AMD).
Upstream commits it as a static file to the repo. This impedes applying
patches to the webui in the build here.
npmDepsHash and patches are done this way to make it easier to use overrideAttrs
(otherwise it is nigh-impossible to get it correct).