From 6cb474e21dd25a2bb44af2998b7d11df0eceb4ef Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Sat, 18 Apr 2026 20:56:52 -0400 Subject: [PATCH] python3Packages.llama-cpp-python: 0.3.16 -> 0.3.22 Changelog: https://llama-cpp-python.readthedocs.io/en/latest/changelog/ Diff: https://github.com/abetlen/llama-cpp-python/compare/v0.3.16...v0.3.22 --- .../llama-cpp-python/default.nix | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/llama-cpp-python/default.nix b/pkgs/development/python-modules/llama-cpp-python/default.nix index 5e9e79e390c8..72a1bdccf7f8 100644 --- a/pkgs/development/python-modules/llama-cpp-python/default.nix +++ b/pkgs/development/python-modules/llama-cpp-python/default.nix @@ -4,7 +4,6 @@ gcc13Stdenv, buildPythonPackage, fetchFromGitHub, - fetchpatch, # nativeBuildInputs cmake, @@ -41,28 +40,16 @@ let in buildPythonPackage.override { stdenv = stdenvTarget; } rec { pname = "llama-cpp-python"; - version = "0.3.16"; + version = "0.3.22"; pyproject = true; src = fetchFromGitHub { owner = "abetlen"; repo = "llama-cpp-python"; tag = "v${version}"; - hash = "sha256-EUDtCv86J4bznsTqNsdgj1IYkAu83cf+RydFTUb2NEE="; + hash = "sha256-Mdz8aTBo3bwoqtjarXnQuNYjcaU+p4HKdMQfSoYwq60="; fetchSubmodules = true; }; - # src = /home/gaetan/llama-cpp-python; - - patches = [ - # Fix test failure on a machine with no metal devices (e.g. nix-community darwin builder) - # https://github.com/ggml-org/llama.cpp/pull/15531 - (fetchpatch { - url = "https://github.com/ggml-org/llama.cpp/pull/15531/commits/63a83ffefe4d478ebadff89300a0a3c5d660f56a.patch"; - stripLen = 1; - extraPrefix = "vendor/llama.cpp/"; - hash = "sha256-9LGnzviBgYYOOww8lhiLXf7xgd/EtxRXGQMredOO4qM="; - }) - ]; dontUseCmakeConfigure = true; cmakeFlags = [ @@ -75,7 +62,6 @@ buildPythonPackage.override { stdenv = stdenvTarget; } rec { # # cc1: error: unknown value ‘native+nodotprod+noi8mm+nosve’ for ‘-mcpu’ (lib.cmakeBool "GGML_NATIVE" false) - (lib.cmakeFeature "GGML_BUILD_NUMBER" "1") ] ++ lib.optionals cudaSupport [ (lib.cmakeBool "GGML_CUDA" true)