diff options
Diffstat (limited to 'pkgs/by-name/ll/llama-cpp/package.nix')
-rw-r--r-- | pkgs/by-name/ll/llama-cpp/package.nix | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/pkgs/by-name/ll/llama-cpp/package.nix b/pkgs/by-name/ll/llama-cpp/package.nix index 400e8f0250c..7328416b93d 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 @@ -37,15 +38,26 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "llama-cpp"; - version = "1483"; + version = "1538"; src = fetchFromGitHub { owner = "ggerganov"; repo = "llama.cpp"; rev = "refs/tags/b${finalAttrs.version}"; - hash = "sha256-TYklPkqwXLt+80FSHBDA2r3xTXlmgqB7sOt2mNnVNso="; + hash = "sha256-3JPGKJbO7Z3Jxz9KNSLYBAM7zQ+RJwBqsfRtpK6JS48="; }; + 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\";" |