3
0
Fork 0
forked from mirrors/nixpkgs

prometheus-alertmanager: fold into go-packages.nix

This commit is contained in:
Benjamin Staffin 2015-08-29 22:55:22 -07:00
parent d74e65bd6f
commit 87655d9fe8
3 changed files with 41 additions and 43 deletions

View file

@ -1,41 +0,0 @@
{ lib, goPackages, fetchFromGitHub }:
let self = goPackages.buildGoPackage rec {
name = "prometheus-alertmanager-${rev}";
rev = "0.0.4";
goPackagePath = "github.com/prometheus/alertmanager";
src = fetchFromGitHub {
owner = "prometheus";
repo = "alertmanager";
inherit rev;
sha256 = "0g656rzal7m284mihqdrw23vhs7yr65ax19nvi70jl51wdallv15";
};
buildInputs = with goPackages; [
fsnotify.v0
httprouter
prometheus.client_golang
prometheus.log
pushover
];
buildFlagsArray = ''
-ldflags=
-X main.buildVersion=${rev}
-X main.buildBranch=master
-X main.buildUser=nix@nixpkgs
-X main.buildDate=20150101-00:00:00
-X main.goVersion=${lib.getVersion goPackages.go}
'';
meta = with lib; {
description = "Alert dispatcher for the Prometheus monitoring system";
homepage = https://github.com/prometheus/alertmanager;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
};
in self.bin

View file

@ -9197,9 +9197,10 @@ let
postgresql_jdbc = callPackage ../servers/sql/postgresql/jdbc { };
prom2json = callPackage ../servers/monitoring/prometheus/prom2json { };
prometheus = goPackages.prometheus.prometheus.bin;
prometheus-alertmanager =
callPackage ../servers/monitoring/prometheus/alertmanager { };
prometheus-alertmanager = goPackages.prometheus.alertmanager.bin;
prometheus-cli =
callPackage ../servers/monitoring/prometheus/cli { };
prometheus-collectd-exporter =

View file

@ -1956,6 +1956,44 @@ let
propagatedBuildInputs = [ kr.text ];
};
prometheus.alertmanager = buildGoPackage rec {
name = "prometheus-alertmanager-${rev}";
rev = "0.0.4";
goPackagePath = "github.com/prometheus/alertmanager";
src = fetchFromGitHub {
owner = "prometheus";
repo = "alertmanager";
inherit rev;
sha256 = "0g656rzal7m284mihqdrw23vhs7yr65ax19nvi70jl51wdallv15";
};
buildInputs = [
fsnotify.v0
httprouter
prometheus.client_golang
prometheus.log
pushover
];
buildFlagsArray = ''
-ldflags=
-X main.buildVersion=${rev}
-X main.buildBranch=master
-X main.buildUser=nix@nixpkgs
-X main.buildDate=20150101-00:00:00
-X main.goVersion=${stdenv.lib.getVersion go}
'';
meta = with stdenv.lib; {
description = "Alert dispatcher for the Prometheus monitoring system";
homepage = https://github.com/prometheus/alertmanager;
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
platforms = platforms.unix;
};
};
prometheus.client_golang = buildFromGitHub rec {
rev = "0.7.0";
date = rev; # Trick buildFromGitHub into keeping the version number