From 0c0ef784a353fa8661c71833b1182654839f2934 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Thu, 19 Sep 2024 09:26:49 -0400 Subject: [PATCH] ollama: add updateScript --- pkgs/by-name/ol/ollama/package.nix | 31 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/ol/ollama/package.nix b/pkgs/by-name/ol/ollama/package.nix index d11e06833efc..c7cdca1891a2 100644 --- a/pkgs/by-name/ol/ollama/package.nix +++ b/pkgs/by-name/ol/ollama/package.nix @@ -8,6 +8,7 @@ makeWrapper, stdenv, addDriverRunpath, + nix-update-script, cmake, gcc12, @@ -199,20 +200,24 @@ goBuild { "-X=github.com/ollama/ollama/server.mode=release" ]; - passthru.tests = - { - inherit ollama; - version = testers.testVersion { - inherit version; - package = ollama; + passthru = { + tests = + { + inherit ollama; + version = testers.testVersion { + inherit version; + package = ollama; + }; + } + // lib.optionalAttrs stdenv.isLinux { + inherit ollama-rocm ollama-cuda; + service = nixosTests.ollama; + service-cuda = nixosTests.ollama-cuda; + service-rocm = nixosTests.ollama-rocm; }; - } - // lib.optionalAttrs stdenv.isLinux { - inherit ollama-rocm ollama-cuda; - service = nixosTests.ollama; - service-cuda = nixosTests.ollama-cuda; - service-rocm = nixosTests.ollama-rocm; - }; + + updateScript = nix-update-script { }; + }; meta = { description =