ollama: don't build llama.cpp twice
buildGoModules runs preBuild hooks in the module download fixed-output derivation, so llama.cpp got built and immediately discarded, to then immediately be built again for the actual Go build.
This commit is contained in:
parent
8c116c6112
commit
0eb5526b69
@ -181,6 +181,14 @@ goBuild (
|
||||
# replace inaccurate version number with actual release version
|
||||
substituteInPlace version/version.go --replace-fail 0.0.0 '${version}'
|
||||
'';
|
||||
|
||||
overrideModAttrs = (
|
||||
finalAttrs: prevAttrs: {
|
||||
# don't run llama.cpp build in the module fetch phase
|
||||
preBuild = "";
|
||||
}
|
||||
);
|
||||
|
||||
preBuild = ''
|
||||
# disable uses of `git`, since nix removes the git directory
|
||||
export OLLAMA_SKIP_PATCHING=true
|
||||
|
Loading…
Reference in New Issue
Block a user