tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
prometheus-postfix-exporter: 0.1.2 -> 0.3.0
Aaron Jheng
3 years ago
b68afa85
a62844b3
+19
-101
2 changed files
expand all
collapse all
unified
split
pkgs
servers
monitoring
prometheus
postfix-exporter-deps.nix
postfix-exporter.nix
-66
pkgs/servers/monitoring/prometheus/postfix-exporter-deps.nix
···
1
-
# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
2
-
[
3
-
{
4
-
goPackagePath = "github.com/beorn7/perks";
5
-
fetch = {
6
-
type = "git";
7
-
url = "https://github.com/beorn7/perks";
8
-
rev = "3a771d992973f24aa725d07868b467d1ddfceafb";
9
-
sha256 = "1l2lns4f5jabp61201sh88zf3b0q793w4zdgp9nll7mmfcxxjif3";
10
-
};
11
-
}
12
-
{
13
-
goPackagePath = "github.com/golang/protobuf";
14
-
fetch = {
15
-
type = "git";
16
-
url = "https://github.com/golang/protobuf";
17
-
rev = "b4deda0973fb4c70b50d226b1af49f3da59f5265";
18
-
sha256 = "0ya4ha7m20bw048m1159ppqzlvda4x0vdprlbk5sdgmy74h3xcdq";
19
-
};
20
-
}
21
-
{
22
-
goPackagePath = "github.com/matttproud/golang_protobuf_extensions";
23
-
fetch = {
24
-
type = "git";
25
-
url = "https://github.com/matttproud/golang_protobuf_extensions";
26
-
rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c";
27
-
sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya";
28
-
};
29
-
}
30
-
{
31
-
goPackagePath = "github.com/prometheus/client_golang";
32
-
fetch = {
33
-
type = "git";
34
-
url = "https://github.com/prometheus/client_golang";
35
-
rev = "82f5ff156b29e276022b1a958f7d385870fb9814";
36
-
sha256 = "111j329yrlgvh73dm80gawwxsh9dgjkw74254kyj5c2rfmra7znz";
37
-
};
38
-
}
39
-
{
40
-
goPackagePath = "github.com/prometheus/client_model";
41
-
fetch = {
42
-
type = "git";
43
-
url = "https://github.com/prometheus/client_model";
44
-
rev = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c";
45
-
sha256 = "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998";
46
-
};
47
-
}
48
-
{
49
-
goPackagePath = "github.com/prometheus/common";
50
-
fetch = {
51
-
type = "git";
52
-
url = "https://github.com/prometheus/common";
53
-
rev = "d811d2e9bf898806ecfb6ef6296774b13ffc314c";
54
-
sha256 = "0r4067r4ysmljksqw3awcxx5qplqhykahc5igdzgkky7i4bvaik1";
55
-
};
56
-
}
57
-
{
58
-
goPackagePath = "github.com/prometheus/procfs";
59
-
fetch = {
60
-
type = "git";
61
-
url = "https://github.com/prometheus/procfs";
62
-
rev = "8b1c2da0d56deffdbb9e48d4414b4e674bd8083e";
63
-
sha256 = "0x128p15h35mgwqxkigfkk1lfrcz9g697ahl8v6xp9kwvcqvjrrf";
64
-
};
65
-
}
66
-
]
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
+19
-35
pkgs/servers/monitoring/prometheus/postfix-exporter.nix
···
1
-
{ lib, buildGoPackage, fetchFromGitHub, makeWrapper, nixosTests
2
-
, systemd, withSystemdSupport ? true }:
3
-
4
-
with lib;
0
0
0
0
5
6
-
buildGoPackage rec {
7
pname = "postfix_exporter";
8
-
version = "0.1.2";
9
-
10
-
goPackagePath = "github.com/kumina/postfix_exporter";
11
12
src = fetchFromGitHub {
13
owner = "kumina";
14
repo = "postfix_exporter";
15
rev = version;
16
-
sha256 = "1b9ib3scxni6hlw55wv6f0z1xfn27l0p29as24f71rs70pyzy4hm";
17
};
18
19
-
nativeBuildInputs = optional withSystemdSupport makeWrapper;
20
-
buildInputs = optional withSystemdSupport systemd;
21
-
tags = optional (!withSystemdSupport) "nosystemd";
22
23
-
goDeps = ./postfix-exporter-deps.nix;
24
-
extraSrcs = optionals withSystemdSupport [
25
-
{
26
-
goPackagePath = "github.com/coreos/go-systemd";
27
-
src = fetchFromGitHub {
28
-
owner = "coreos";
29
-
repo = "go-systemd";
30
-
rev = "d1b7d058aa2adfc795ad17ff4aaa2bc64ec11c78";
31
-
sha256 = "1nz3v1b90hnmj2vjjwq96pr6psxlndqjyd30v9sgiwygzb7db9mv";
32
-
};
33
-
}
34
-
{
35
-
goPackagePath = "github.com/coreos/pkg";
36
-
src = fetchFromGitHub {
37
-
owner = "coreos";
38
-
repo = "pkg";
39
-
rev = "97fdf19511ea361ae1c100dd393cc47f8dcfa1e1";
40
-
sha256 = "1srn87wih25l09f75483hnxsr8fc6rq3bk7w1x8125ym39p6mg21";
41
-
};
42
-
}
43
-
];
44
45
-
postInstall = optionalString withSystemdSupport ''
46
wrapProgram $out/bin/postfix_exporter \
47
--prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib"
48
'';
49
50
passthru.tests = { inherit (nixosTests.prometheus-exporters) postfix; };
51
52
-
meta = {
53
inherit (src.meta) homepage;
54
description = "A Prometheus exporter for Postfix";
55
license = licenses.asl20;
···
1
+
{ lib
2
+
, buildGoModule
3
+
, fetchFromGitHub
4
+
, makeWrapper
5
+
, nixosTests
6
+
, systemd
7
+
, withSystemdSupport ? true
8
+
}:
9
10
+
buildGoModule rec {
11
pname = "postfix_exporter";
12
+
version = "0.3.0";
0
0
13
14
src = fetchFromGitHub {
15
owner = "kumina";
16
repo = "postfix_exporter";
17
rev = version;
18
+
sha256 = "sha256-63ze51Qbjm+3CV1OFGFa9cS4ucZ+gMKaJyBF2b//CfM=";
19
};
20
21
+
vendorSha256 = "sha256-a4Lk4wh4mvXEjLgFksZIVVtbp+zTUyjtLVuk7vuot2k=";
0
0
22
23
+
ldflags = [ "-s" "-w" ];
24
+
25
+
nativeBuildInputs = lib.optionals withSystemdSupport [ makeWrapper ];
26
+
buildInputs = lib.optionals withSystemdSupport [ systemd ];
27
+
tags = lib.optionals (!withSystemdSupport) "nosystemd";
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
28
29
+
postInstall = lib.optionals withSystemdSupport ''
30
wrapProgram $out/bin/postfix_exporter \
31
--prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib"
32
'';
33
34
passthru.tests = { inherit (nixosTests.prometheus-exporters) postfix; };
35
36
+
meta = with lib; {
37
inherit (src.meta) homepage;
38
description = "A Prometheus exporter for Postfix";
39
license = licenses.asl20;