Nix portability improvements
This MR updates the Nix package in the interest of improving portability (in regards to cross-compilation and other libcs).
Changes:
- Use a multi-output derivation to reduce runtime closure sizes
- Move dependencies into the
native/propagatedbuildInputsets where appropriate - Do not link
stdc++fson platforms that do not support it - Allow setting
LLAMA_BUILD_*options through Nix - Enable tests in the Nix build
- Add myself as a Nix package maintainer
Tested platforms:
- GCC/glibc on
x86_64forx86_64 - LLVM/glibc on
x86_64forx86_64 - GCC/glibc on
x86_64foraarch64 - GCC/musl on
x86_64for staticaarch64
Tested. Nice. Let's do a nix flake update too. I have on my list to set up an automated PR system to push nix flake updates since https://github.com/ggml-org/llama.cpp/pull/10526 landed.
Tested. Nice. Let's do a nix flake update too. I have on my list to set up an automated PR system to push nix flake updates since https://github.com/ggml-org/llama.cpp/pull/10526 landed.
We could also consider replacing the flake with normal Nix and e.g. following the release channel. EDIT: well we'd have to keep around a flake for compatibility, but we could e.g. leave out the lock file