forked from mirrors/nixpkgs
Merge pull request #156640 from fpletz/alertmanager-0.23.0
prometheus-alertmanager: 0.21.0 -> 0.23.0
This commit is contained in:
commit
7e003d7fb9
|
@ -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; {
|
||||
|
|
Loading…
Reference in a new issue