From 72590183f0a1301dafb44b8f0a57871e71d32d00 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Wed, 17 May 2023 21:34:05 -0300 Subject: [PATCH] mods: add updateScript and tests.version Signed-off-by: Otavio Salvador --- pkgs/tools/misc/mods/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/tools/misc/mods/default.nix b/pkgs/tools/misc/mods/default.nix index 83b1e7db1052..22e69de3ecc9 100644 --- a/pkgs/tools/misc/mods/default.nix +++ b/pkgs/tools/misc/mods/default.nix @@ -1,6 +1,9 @@ { lib , buildGoModule , fetchFromGitHub +, gitUpdater +, testers +, mods }: buildGoModule rec { @@ -18,6 +21,17 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X=main.version=${version}" ]; + passthru = { + updateScript = gitUpdater { + rev-prefix = "v"; + ignoredVersions = ".(rc|beta).*"; + }; + + tests.version = testers.testVersion { + package = mods; + }; + }; + meta = with lib; { description = "AI on the command line"; homepage = "https://github.com/charmbracelet/mods";