From 5efa1bce1707f93be859fcf378842aba2e3849e4 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Tue, 25 Jan 2022 02:20:26 +0100 Subject: [PATCH] prometheus-alertmanager: 0.21.0 -> 0.23.0 --- .../monitoring/prometheus/alertmanager.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/servers/monitoring/prometheus/alertmanager.nix b/pkgs/servers/monitoring/prometheus/alertmanager.nix index 251c977bd4df..db9443fc04a9 100644 --- a/pkgs/servers/monitoring/prometheus/alertmanager.nix +++ b/pkgs/servers/monitoring/prometheus/alertmanager.nix @@ -1,20 +1,22 @@ -{ lib, go, buildGoPackage, fetchFromGitHub, installShellFiles }: +{ lib, go, buildGoModule, fetchFromGitHub, installShellFiles }: -buildGoPackage rec { +buildGoModule rec { pname = "alertmanager"; - version = "0.21.0"; + version = "0.23.0"; rev = "v${version}"; - goPackagePath = "github.com/prometheus/alertmanager"; - src = fetchFromGitHub { inherit rev; owner = "prometheus"; repo = "alertmanager"; - sha256 = "0zrzyaqs73pz4rmj4xaj15x4n1542m0nb7jqm2j77k07j75r5w41"; + sha256 = "sha256-06mKgWUyw5jsjKiRXQ9/oqHvFdkY2nS9Z3eW60lTNbU="; }; - ldflags = let t = "${goPackagePath}/vendor/github.com/prometheus/common/version"; in [ + vendorSha256 = "sha256-zJvzCC7Vn5repWssyDuGtoUSZC2ojQhMqDX5Orr0ST0="; + + subPackages = [ "cmd/alertmanager" "cmd/amtool" ]; + + ldflags = let t = "github.com/prometheus/common/version"; in [ "-X ${t}.Version=${version}" "-X ${t}.Revision=${src.rev}" "-X ${t}.Branch=unknown" @@ -28,6 +30,8 @@ buildGoPackage rec { postInstall = '' $out/bin/amtool --completion-script-bash > amtool.bash installShellCompletion amtool.bash + $out/bin/amtool --completion-script-zsh > amtool.zsh + installShellCompletion amtool.zsh ''; meta = with lib; {