11 pname = "alertmanager";
15 src = fetchFromGitHub {
18 repo = "alertmanager";
19 hash = "sha256-soE2D/PLesV1+Kif9myB54a9zIFIa94i0BrmywJPTbI=";
22 vendorHash = "sha256-zkHIdEdAy44iV2F929NB3ISuUbxdecaeZcsNQQGd06E=";
31 t = "github.com/prometheus/common/version";
34 "-X ${t}.Version=${version}"
35 "-X ${t}.Revision=${src.rev}"
36 "-X ${t}.Branch=unknown"
37 "-X ${t}.BuildUser=nix@nixpkgs"
38 "-X ${t}.BuildDate=unknown"
39 "-X ${t}.GoVersion=${lib.getVersion go}"
42 nativeBuildInputs = [ installShellFiles ];
45 $out/bin/amtool --completion-script-bash > amtool.bash
46 installShellCompletion amtool.bash
47 $out/bin/amtool --completion-script-zsh > amtool.zsh
48 installShellCompletion amtool.zsh
51 passthru.tests = { inherit (nixosTests.prometheus) alertmanager; };
54 description = "Alert dispatcher for the Prometheus monitoring system";
55 homepage = "https://github.com/prometheus/alertmanager";
56 changelog = "https://github.com/prometheus/alertmanager/blob/v${version}/CHANGELOG.md";
57 license = licenses.asl20;
58 maintainers = with maintainers; [