llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

Nix portability improvements

Open hacker1024 opened this issue 8 months ago • 2 comments

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/propagated buildInput sets where appropriate
  • Do not link stdc++fs on 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_64 for x86_64
  • LLVM/glibc on x86_64 for x86_64
  • GCC/glibc on x86_64 for aarch64
  • GCC/musl on x86_64 for static aarch64

hacker1024 avatar Apr 18 '25 06:04 hacker1024

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.

philiptaron avatar Apr 23 '25 17:04 philiptaron

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

SomeoneSerge avatar Apr 25 '25 19:04 SomeoneSerge