mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 20:02:58 +03:00
prometheus-alertmanager: extracted from goPackages
This commit is contained in:
parent
4bf5a93f2d
commit
a6cd1321b9
43
pkgs/servers/monitoring/prometheus/alertmanager.nix
Normal file
43
pkgs/servers/monitoring/prometheus/alertmanager.nix
Normal file
@ -0,0 +1,43 @@
|
||||
# This file was generated by go2nix.
|
||||
{ stdenv, lib, goPackages, fetchgit, fetchhg, fetchbzr, fetchsvn }:
|
||||
|
||||
with goPackages;
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "alertmanager-${version}";
|
||||
version = "0.1.0";
|
||||
rev = "${version}";
|
||||
|
||||
goPackagePath = "github.com/prometheus/alertmanager";
|
||||
|
||||
src = fetchgit {
|
||||
inherit rev;
|
||||
url = "https://github.com/prometheus/alertmanager";
|
||||
sha256 = "1ya465bns6cj2lqbipmfm13wz8kxii5h9mm7lc0ba1xv26xx5zs7";
|
||||
};
|
||||
|
||||
# Tests exist, but seem to clash with the firewall.
|
||||
doCheck = false;
|
||||
|
||||
preBuild = ''
|
||||
export GO15VENDOREXPERIMENT=1
|
||||
'';
|
||||
|
||||
buildFlagsArray = let t = "${goPackagePath}/version"; in ''
|
||||
-ldflags=
|
||||
-X ${t}.Version=${version}
|
||||
-X ${t}.Revision=unknown
|
||||
-X ${t}.Branch=unknown
|
||||
-X ${t}.BuildUser=nix@nixpkgs
|
||||
-X ${t}.BuildDate=unknown
|
||||
-X ${t}.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;
|
||||
};
|
||||
}
|
@ -10179,7 +10179,7 @@ in
|
||||
|
||||
prom2json = callPackage ../servers/monitoring/prometheus/prom2json.nix { };
|
||||
prometheus = callPackage ../servers/monitoring/prometheus { };
|
||||
prometheus-alertmanager = goPackages.prometheus.alertmanager.bin // { outputs = [ "bin" ]; };
|
||||
prometheus-alertmanager = callPackage ../servers/monitoring/prometheus/alertmanager.nix { };
|
||||
prometheus-cli = goPackages.prometheus.cli.bin // { outputs = [ "bin" ]; };
|
||||
prometheus-collectd-exporter = goPackages.prometheus.collectd-exporter.bin // { outputs = [ "bin" ]; };
|
||||
prometheus-haproxy-exporter = goPackages.prometheus.haproxy-exporter.bin // { outputs = [ "bin" ]; };
|
||||
|
@ -2564,46 +2564,6 @@ let
|
||||
propagatedBuildInputs = [ kr.text ];
|
||||
};
|
||||
|
||||
prometheus.alertmanager = buildFromGitHub rec {
|
||||
rev = "0.1.0";
|
||||
owner = "prometheus";
|
||||
repo = "alertmanager";
|
||||
sha256 = "1ya465bns6cj2lqbipmfm13wz8kxii5h9mm7lc0ba1xv26xx5zs7";
|
||||
|
||||
buildInputs = [
|
||||
# fsnotify.v0
|
||||
# httprouter
|
||||
# prometheus.client_golang
|
||||
# prometheus.log
|
||||
# pushover
|
||||
];
|
||||
|
||||
# Tests exist, but seem to clash with the firewall.
|
||||
doCheck = false;
|
||||
|
||||
preBuild = ''
|
||||
export GO15VENDOREXPERIMENT=1
|
||||
'';
|
||||
|
||||
buildFlagsArray = let t = "github.com/${owner}/${repo}/version"; in ''
|
||||
-ldflags=
|
||||
-X ${t}.Version=${rev}
|
||||
-X ${t}.Revision=unknown
|
||||
-X ${t}.Branch=unknown
|
||||
-X ${t}.BuildUser=nix@nixpkgs
|
||||
-X ${t}.BuildDate=unknown
|
||||
-X ${t}.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 {
|
||||
rev = "0.7.0";
|
||||
owner = "prometheus";
|
||||
|
Loading…
Reference in New Issue
Block a user