2020-06-18 11:48:40 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, installShellFiles, nixosTests }:
|
2019-07-29 19:06:41 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
buildGoPackage {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "mailexporter";
|
2019-07-29 19:06:41 +01:00
|
|
|
version = "2019-07-14";
|
|
|
|
|
|
|
|
goPackagePath = "github.com/cherti/mailexporter";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "c60d1970abbedb15e70d6fc858f7fd76fa061ffe";
|
|
|
|
owner = "cherti";
|
|
|
|
repo = "mailexporter";
|
|
|
|
sha256 = "0wlw7jvmhgvg1r2bsifxm2d0vj0iqhplnx6n446625sslvddx3vn";
|
|
|
|
};
|
|
|
|
|
|
|
|
goDeps = ./mail-exporter_deps.nix;
|
|
|
|
|
2020-04-26 04:16:55 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2019-07-29 19:06:41 +01:00
|
|
|
postInstall = ''
|
2020-04-26 04:16:55 +01:00
|
|
|
installManPage $src/man/mailexporter.1
|
|
|
|
installManPage $src/man/mailexporter.conf.5
|
2019-07-29 19:06:41 +01:00
|
|
|
'';
|
|
|
|
|
2020-06-18 11:48:40 +01:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) mail; };
|
|
|
|
|
2019-07-29 19:06:41 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Export Prometheus-style metrics about mail server functionality";
|
|
|
|
homepage = "https://github.com/cherti/mailexporter";
|
|
|
|
license = licenses.gpl3;
|
2019-08-20 18:36:05 +01:00
|
|
|
maintainers = with maintainers; [ willibutz globin ];
|
2019-07-29 19:06:41 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|