nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 installShellFiles,
6 nixosTests,
7}:
8
9buildGoModule {
10 pname = "mailexporter";
11 version = "2020-07-16";
12
13 src = fetchFromGitHub {
14 owner = "cherti";
15 repo = "mailexporter";
16 rev = "f5a552c736ac40ccdc0110d2e9a71619c1cd6862";
17 hash = "sha256-P7LZi2iXZJaY5AEJBeAVszq/DN9SFxNfeQaflnF6+ng=";
18 };
19
20 vendorHash = "sha256-QOOf00uCdC8fl7V/+Q8X90yQ7xc0Tb6M9dXisdGEisM=";
21
22 nativeBuildInputs = [ installShellFiles ];
23
24 postInstall = ''
25 installManPage $src/man/mailexporter.1
26 installManPage $src/man/mailexporter.conf.5
27 '';
28
29 passthru.tests = { inherit (nixosTests.prometheus-exporters) mail; };
30
31 meta = {
32 description = "Export Prometheus-style metrics about mail server functionality";
33 mainProgram = "mailexporter";
34 homepage = "https://github.com/cherti/mailexporter";
35 license = lib.licenses.gpl3;
36 maintainers = with lib.maintainers; [
37 globin
38 ];
39 platforms = lib.platforms.linux;
40 };
41}