diff options
Diffstat (limited to 'pkgs/tools/misc/ollama/default.nix')
-rw-r--r-- | pkgs/tools/misc/ollama/default.nix | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/pkgs/tools/misc/ollama/default.nix b/pkgs/tools/misc/ollama/default.nix index 1f14dadfba69e..8730fe0d07822 100644 --- a/pkgs/tools/misc/ollama/default.nix +++ b/pkgs/tools/misc/ollama/default.nix @@ -1,5 +1,5 @@ { lib -, buildGoModule +, buildGo122Module , fetchFromGitHub , fetchpatch , buildEnv @@ -21,16 +21,19 @@ # one of `[ null "rocm" "cuda" ]` , acceleration ? null + +, testers +, ollama }: let pname = "ollama"; - version = "0.1.28"; + version = "0.1.29"; src = fetchFromGitHub { owner = "jmorganca"; repo = "ollama"; rev = "v${version}"; - hash = "sha256-8f7veZitorNiqGBPJuf/Y36TcFK8Q75Vw4w6CeTk8qs="; + hash = "sha256-M2G53DJF/22ZVCAb4jGjyErKO6q2argehHSV7AEef6w="; fetchSubmodules = true; }; @@ -79,9 +82,9 @@ let goBuild = if enableCuda then - buildGoModule.override { stdenv = overrideCC stdenv gcc12; } + buildGo122Module.override { stdenv = overrideCC stdenv gcc12; } else - buildGoModule; + buildGo122Module; preparePatch = patch: hash: fetchpatch { url = "file://${src}/llm/patches/${patch}"; inherit hash; @@ -99,7 +102,7 @@ goBuild ((lib.optionalAttrs enableRocm { CUDAToolkit_ROOT = cudaToolkit; }) // { inherit pname version src; - vendorHash = "sha256-DPIhDqE/yXpSQqrx07osMBMafK61yU2dl4cZhxSTvm8="; + vendorHash = "sha256-Lj7CBvS51RqF63c01cOCgY7BCQeCKGu794qzb/S80C0="; nativeBuildInputs = [ cmake @@ -168,9 +171,14 @@ goBuild ((lib.optionalAttrs enableRocm { service = nixosTests.ollama; rocm = pkgs.ollama.override { acceleration = "rocm"; }; cuda = pkgs.ollama.override { acceleration = "cuda"; }; + version = testers.testVersion { + inherit version; + package = ollama; + }; }; meta = { + changelog = "https://github.com/ollama/ollama/releases/tag/v${version}"; description = "Get up and running with large language models locally"; homepage = "https://github.com/jmorganca/ollama"; license = licenses.mit; |