llama-cpp: require newer apple sdk (fix darwin) (#442216)

This commit is contained in:
Philip Taron
2025-09-11 23:10:14 +00:00
committed by GitHub
+19 -10
View File
@@ -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;
};