python3Packages.llama-cpp-python: 0.3.6 -> 0.3.8

diff: https://github.com/abetlen/llama-cpp-python/compare/v0.3.6...v0.3.8
This commit is contained in:
Kirill Radzikhovskyy
2025-03-22 09:40:35 +11:00
parent 794c70df78
commit 7e69ba35c2
@@ -4,7 +4,6 @@
gcc13Stdenv,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
# nativeBuildInputs
cmake,
@@ -40,28 +39,18 @@ let
in
buildPythonPackage rec {
pname = "llama-cpp-python";
version = "0.3.6";
version = "0.3.8";
pyproject = true;
src = fetchFromGitHub {
owner = "abetlen";
repo = "llama-cpp-python";
tag = "v${version}";
hash = "sha256-d5nMgpS7m6WEILs222ztwphoqkAezJ+qt6sVKSlpIYI=";
hash = "sha256-F1E1c2S1iIL3HX/Sot/uIIrOWvfPU1dCrHx14A1Jn9E=";
fetchSubmodules = true;
};
# src = /home/gaetan/llama-cpp-python;
patches = [
# fix segfault when running tests due to missing default Metal devices
(fetchpatch2 {
url = "https://github.com/ggml-org/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 ";" (
# Set GGML_NATIVE=off. Otherwise, cmake attempts to build with
@@ -72,7 +61,10 @@ buildPythonPackage rec {
# -mcpu, breaking linux build as follows:
#
# cc1: error: unknown value native+nodotprod+noi8mm+nosve for -mcpu
[ "-DGGML_NATIVE=off" ]
[
"-DGGML_NATIVE=off"
"-DGGML_BUILD_NUMBER=1"
]
++ lib.optionals cudaSupport [
"-DGGML_CUDA=on"
"-DCUDAToolkit_ROOT=${lib.getDev cudaPackages.cuda_nvcc}"