diff options
| author | Ihar Hrachyshka <ihar.hrachyshka@gmail.com> | 2025-01-26 22:45:56 +0000 |
|---|---|---|
| committer | Ihar Hrachyshka <ihar.hrachyshka@gmail.com> | 2025-01-27 22:32:10 -0500 |
| commit | 888795187e29bba2f9d27563a0b3f1fd7b8a4746 (patch) | |
| tree | e1ba3fee949c5b0a597a2ebfb3e925facc8acc34 /pkgs/development/python-modules/llama-cpp-python | |
| parent | 6d15d203b6824564b072d8f55fe9eed1c6f7911e (diff) | |
python312Packages.llama-cpp-python: fix darwin build w/o Metal devices
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 [ |
