blob: 888089dce35a90a0bdb631f6faf43f9020d9ab5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
{
lib,
fetchFromGitHub,
go,
buildGoModule,
versionCheckHook,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "node-cert-exporter";
version = "1.1.7-unstable-2025-03-10";
src = fetchFromGitHub {
owner = "amimof";
repo = "node-cert-exporter";
rev = "eef1b8207b5fdb4d6690fcfa543caf823cff0754";
hash = "sha256-/z2wQmcCEsPKEMKj7OunD0e+9OvXv6NV6Bn8myW6HLk=";
};
# Required otherwise we get a few:
# vendor/github.com/golang/glog/internal/logsink/logsink.go:129:41:
# predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
patches = [ ./gomod.patch ];
vendorHash = "sha256-Y/JgjWb2eFe4aCTU/v05rB5xH9TgZgZt2WITalj1nwc=";
ldflags = [
"-s"
"-X main.VERSION=${finalAttrs.version}"
"-X main.COMMIT=${finalAttrs.src.rev}"
"-X main.BRANCH=master"
"-X main.GOVERSION=${go.version}"
];
doInstallCheck = true;
versionCheckProgramArg = "--version";
nativeInstallCheckInputs = [ versionCheckHook ];
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
meta = {
description = "Prometheus exporter for SSL certificate";
homepage = "https://github.com/amimof/node-cert-exporter";
license = lib.licenses.asl20;
mainProgram = "node-cert-exporter";
maintainers = with lib.maintainers; [ ibizaman ];
};
})
|