diff options
Diffstat (limited to 'pkgs/development/python-modules/llama-cpp-python')
| -rw-r--r-- | pkgs/development/python-modules/llama-cpp-python/default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/llama-cpp-python/default.nix b/pkgs/development/python-modules/llama-cpp-python/default.nix index ade74c97bef9..6c07005d4ddf 100644 --- a/pkgs/development/python-modules/llama-cpp-python/default.nix +++ b/pkgs/development/python-modules/llama-cpp-python/default.nix @@ -4,6 +4,7 @@ gcc13Stdenv, buildPythonPackage, fetchFromGitHub, + fetchpatch2, # nativeBuildInputs cmake, @@ -51,6 +52,16 @@ buildPythonPackage rec { }; # src = /home/gaetan/llama-cpp-python; + patches = [ + # fix segfault when running tests due to missing default Metal devices + (fetchpatch2 { + url = "https://github.com/ggerganov/llama.cpp/commit/acd38efee316f3a5ed2e6afcbc5814807c347053.patch?full_index=1"; + stripLen = 1; + extraPrefix = "vendor/llama.cpp/"; + hash = "sha256-71+Lpg9z5KPlaQTX9D85KS2LXFWLQNJJ18TJyyq3/pU="; + }) + ]; + dontUseCmakeConfigure = true; SKBUILD_CMAKE_ARGS = lib.strings.concatStringsSep ";" ( lib.optionals cudaSupport [ |
