diff options
-rw-r--r-- | pkgs/by-name/ll/llama-cpp/package.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/by-name/ll/llama-cpp/package.nix b/pkgs/by-name/ll/llama-cpp/package.nix index 400e8f0250c06..408f83642ba59 100644 --- a/pkgs/by-name/ll/llama-cpp/package.nix +++ b/pkgs/by-name/ll/llama-cpp/package.nix @@ -2,6 +2,7 @@ , cmake , darwin , fetchFromGitHub +, fetchpatch , nix-update-script , stdenv , symlinkJoin @@ -46,6 +47,17 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-TYklPkqwXLt+80FSHBDA2r3xTXlmgqB7sOt2mNnVNso="; }; + patches = [ + # openblas > v0.3.21 64-bit pkg-config file is now named openblas64.pc + # can remove when patch is accepted upstream + # https://github.com/ggerganov/llama.cpp/pull/4134 + (fetchpatch { + name = "openblas64-pkg-config.patch"; + url = "https://github.com/ggerganov/llama.cpp/commit/c885cc9f76c00557601b877136191b0f7aadc320.patch"; + hash = "sha256-GBTxCiNrCazYRvcHwbqVMAALuJ+Svzf5BE7+nkxw064="; + }) + ]; + postPatch = '' substituteInPlace ./ggml-metal.m \ --replace '[bundle pathForResource:@"ggml-metal" ofType:@"metal"];' "@\"$out/bin/ggml-metal.metal\";" |