Files
Alexander Miroshnichenko 73f782d523 feat(packages): add llama-cpp b9645 for Strix Halo (ROCm + Vulkan)
Pin upstream llama.cpp b9645 and build it against the nixpkgs-latest
input (the flake's pinned nixpkgs only carries the pre-tools/ui b8983).
ROCm deps come from rocmPackages.gfx1151, so clr/rocBLAS/hipBLAS are
built for gfx1151 only; clr's own build is arch-independent, so its
store path stays substitutable. Vulkan on, CPU variants with znver5 /
AVX-512, web UI and npm toolchain dropped.

Ported from nixos-config's llm-engine.nix with two fixes: npmConfigHook
hard-fails when npmDeps is null, so nodejs and the hook are stripped
from nativeBuildInputs, and CMAKE_HIP_FLAGS is appended to
cmakeFlagsArray because the cmake hook word-splits plain cmakeFlags.

Verified on the Radeon 8060S (gfx1151): llama-bench loads both ROCm and
Vulkan backends and completes pp16/tg8 runs.
2026-09-13 13:33:30 +03:00

18 lines
656 B
Nix

{
pkgs,
inputs,
...
}:
# llama.cpp b9645 is newer than the flake's pinned nixpkgs (llama-cpp b8983,
# pre-tools/ui) and needs its UI/ROCm layout, so build against the
# nixpkgs-latest input — same pattern as mcp-gateway/kubernetes-mcp-server.
let
latestPkgs = inputs.nixpkgs-latest.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
latestPkgs.callPackage ./package.nix {
# Strix Halo: build the ROCm dependencies (clr, rocBLAS, hipBLAS) for gfx1151
# only instead of every supported arch. clr's own build is arch-independent,
# so its store path is unchanged and stays substitutable.
rocmPackages = latestPkgs.rocmPackages.gfx1151;
}