diff --git a/pkgs/by-name/up/updatecli/package.nix b/pkgs/by-name/up/updatecli/package.nix index c3999383ba9e..dd60bdf8a166 100644 --- a/pkgs/by-name/up/updatecli/package.nix +++ b/pkgs/by-name/up/updatecli/package.nix @@ -4,6 +4,8 @@ , fetchFromGitHub , nix-update-script , installShellFiles +, testers +, updatecli }: buildGoModule rec { @@ -12,7 +14,7 @@ buildGoModule rec { src = fetchFromGitHub { owner = "updatecli"; - repo = pname; + repo = "updatecli"; rev = "v${version}"; hash = "sha256-sBkTdr4/DqNrCxtaM1tVTx+rQ1dvJ1KwlFvAJHIZCuw="; }; @@ -32,7 +34,13 @@ buildGoModule rec { "-X github.com/updatecli/updatecli/pkg/core/version.Version=${version}" ]; - passthru.updateScript = nix-update-script { }; + passthru = { + updateScript = nix-update-script { }; + tests.version = testers.testVersion { + package = updatecli; + command = "updatecli version"; + }; + }; nativeBuildInputs = [ installShellFiles ]; @@ -52,7 +60,7 @@ buildGoModule rec { Updatecli is a command-line tool used to define and apply update strategies. ''; homepage = "https://www.updatecli.io"; - changelog = "https://github.com/updatecli/updatecli/releases/tag/v${version}"; + changelog = "https://github.com/updatecli/updatecli/releases/tag/${src.rev}"; license = licenses.asl20; mainProgram = "updatecli"; maintainers = with maintainers; [ croissong ];