Merge pull request #280650 from newAM/llama-cpp-1848

llama-cpp: 1742 -> 1848
This commit is contained in:
Nick Cao 2024-01-13 10:28:02 -05:00 committed by GitHub
commit 2e40ca8ca7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,6 @@
, cmake
, darwin
, fetchFromGitHub
, fetchpatch
, nix-update-script
, stdenv
@ -30,26 +29,15 @@ let
in
effectiveStdenv.mkDerivation (finalAttrs: {
pname = "llama-cpp";
version = "1742";
version = "1848";
src = fetchFromGitHub {
owner = "ggerganov";
repo = "llama.cpp";
rev = "refs/tags/b${finalAttrs.version}";
hash = "sha256-0xpWDKzRcm32jkPsvHD2o9grUdo9n+4cvpYiKQ8LqRY=";
hash = "sha256-KuomiKU9c06Ux/ZcqctFdPQykGtjDzArN+tElPJVQ60=";
};
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\";"