diff --git a/pkgs/by-name/ll/llama-cpp/package.nix b/pkgs/by-name/ll/llama-cpp/package.nix index 9f9af59cc7de..c3ae8e1dc0c7 100644 --- a/pkgs/by-name/ll/llama-cpp/package.nix +++ b/pkgs/by-name/ll/llama-cpp/package.nix @@ -30,7 +30,9 @@ metalSupport ? stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 && !openclSupport, vulkanSupport ? false, rpcSupport ? false, + apple-sdk_14, curl, + llama-cpp, shaderc, vulkan-headers, vulkan-loader, @@ -119,6 +121,7 @@ effectiveStdenv.mkDerivation (finalAttrs: { ++ optionals rocmSupport rocmBuildInputs ++ optionals blasSupport [ blas ] ++ optionals vulkanSupport vulkanBuildInputs + ++ optionals metalSupport [ apple-sdk_14 ] ++ [ curl ]; preConfigure = '' @@ -173,25 +176,31 @@ effectiveStdenv.mkDerivation (finalAttrs: { # the tests are failing as of 2025-08 doCheck = false; - passthru.updateScript = nix-update-script { - attrPath = "llama-cpp"; - extraArgs = [ - "--version-regex" - "b(.*)" - ]; + passthru = { + tests = { + metal = llama-cpp.override { metalSupport = true; }; + }; + updateScript = nix-update-script { + attrPath = "llama-cpp"; + extraArgs = [ + "--version-regex" + "b(.*)" + ]; + }; }; - meta = with lib; { + meta = { description = "Inference of Meta's LLaMA model (and others) in pure C/C++"; homepage = "https://github.com/ggml-org/llama.cpp"; - license = licenses.mit; + license = lib.licenses.mit; mainProgram = "llama"; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ + booxter dit7ya philiptaron xddxdd ]; - platforms = platforms.unix; + platforms = lib.platforms.unix; badPlatforms = optionals (cudaSupport || openclSupport) lib.platforms.darwin; broken = metalSupport && !effectiveStdenv.hostPlatform.isDarwin; };