llama-cpp: 3887 -> 4154 (#358908)
This commit is contained in:
commit
f7337d66df
@ -69,13 +69,13 @@ let
|
|||||||
in
|
in
|
||||||
effectiveStdenv.mkDerivation (finalAttrs: {
|
effectiveStdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "llama-cpp";
|
pname = "llama-cpp";
|
||||||
version = "3887";
|
version = "4154";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ggerganov";
|
owner = "ggerganov";
|
||||||
repo = "llama.cpp";
|
repo = "llama.cpp";
|
||||||
rev = "refs/tags/b${finalAttrs.version}";
|
rev = "refs/tags/b${finalAttrs.version}";
|
||||||
hash = "sha256-uyZ/uyuLzXAeZ8TQK8e6+zf+ZTFRSJJ1Doqw8Cd10+A=";
|
hash = "sha256-rttgk8mF9s3R53+TN5+PdDtkTG5cohn/9wz9Z5gRpdM=";
|
||||||
leaveDotGit = true;
|
leaveDotGit = true;
|
||||||
postFetch = ''
|
postFetch = ''
|
||||||
git -C "$out" rev-parse --short HEAD > $out/COMMIT
|
git -C "$out" rev-parse --short HEAD > $out/COMMIT
|
||||||
@ -84,8 +84,16 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
|||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace ./ggml/src/ggml-metal.m \
|
# Workaround for local-ai package which overrides this package to an older llama-cpp
|
||||||
--replace-fail '[bundle pathForResource:@"ggml-metal" ofType:@"metal"];' "@\"$out/bin/ggml-metal.metal\";"
|
if [ -f ./ggml/src/ggml-metal.m ]; then
|
||||||
|
substituteInPlace ./ggml/src/ggml-metal.m \
|
||||||
|
--replace-fail '[bundle pathForResource:@"ggml-metal" ofType:@"metal"];' "@\"$out/bin/ggml-metal.metal\";"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f ./ggml/src/ggml-metal/ggml-metal.m ]; then
|
||||||
|
substituteInPlace ./ggml/src/ggml-metal/ggml-metal.m \
|
||||||
|
--replace-fail '[bundle pathForResource:@"ggml-metal" ofType:@"metal"];' "@\"$out/bin/ggml-metal.metal\";"
|
||||||
|
fi
|
||||||
|
|
||||||
substituteInPlace ./scripts/build-info.sh \
|
substituteInPlace ./scripts/build-info.sh \
|
||||||
--replace-fail 'build_number="0"' 'build_number="${finalAttrs.version}"' \
|
--replace-fail 'build_number="0"' 'build_number="${finalAttrs.version}"' \
|
||||||
@ -160,7 +168,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
|||||||
homepage = "https://github.com/ggerganov/llama.cpp/";
|
homepage = "https://github.com/ggerganov/llama.cpp/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
mainProgram = "llama";
|
mainProgram = "llama";
|
||||||
maintainers = with maintainers; [ dit7ya elohmeier philiptaron ];
|
maintainers = with maintainers; [ dit7ya elohmeier philiptaron xddxdd ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
badPlatforms = optionals (cudaSupport || openclSupport) lib.platforms.darwin;
|
badPlatforms = optionals (cudaSupport || openclSupport) lib.platforms.darwin;
|
||||||
broken = (metalSupport && !effectiveStdenv.hostPlatform.isDarwin);
|
broken = (metalSupport && !effectiveStdenv.hostPlatform.isDarwin);
|
||||||
|
Loading…
Reference in New Issue
Block a user