blob: b6641914ad358535ecd1ac6b3a7795e3f749fa0a (
plain) (
blame)
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
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests, fetchpatch }:
buildGoModule rec {
pname = "redis_exporter";
version = "1.51.0";
src = fetchFromGitHub {
owner = "oliver006";
repo = "redis_exporter";
rev = "v${version}";
sha256 = "sha256-NvkAwUrygjys25lcTxtRnrex4+XIK2yzqKkk26f4cmE=";
};
patches = [
# https://github.com/oliver006/redis_exporter/pull/812
(fetchpatch {
url = "https://github.com/Ma27/redis_exporter/commit/250b2e9febbadef326ca9ae68c372dfaabd53ca9.patch";
sha256 = "sha256-G1OIUwlFZ06UWudWvc6v1YFcRz05ji1326nUcd9zYDc=";
})
];
vendorHash = "sha256-S7cEaFBgyvDmsNq+NvqtC8I2SRL/ngXUuNdx6TN/riI=";
ldflags = [
"-X main.BuildVersion=${version}"
"-X main.BuildCommitSha=unknown"
"-X main.BuildDate=unknown"
];
# needs a redis server
doCheck = false;
passthru.tests = { inherit (nixosTests.prometheus-exporters) redis; };
meta = with lib; {
description = "Prometheus exporter for Redis metrics";
homepage = "https://github.com/oliver006/redis_exporter";
license = licenses.mit;
maintainers = with maintainers; [ eskytthe srhb ma27 ];
};
}
|