nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5}:
6
7buildGoModule rec {
8 pname = "statsd_exporter";
9 version = "0.28.0";
10
11 src = fetchFromGitHub {
12 owner = "prometheus";
13 repo = "statsd_exporter";
14 rev = "v${version}";
15 hash = "sha256-h58yD+jmvUCvYsJqNcBSR1f+5YgDyMbLDd3I0HW9/kA=";
16 };
17
18 ldflags =
19 let
20 t = "github.com/prometheus/common/version";
21 in
22 [
23 "-s"
24 "-w"
25 "-X ${t}.Version=${version}"
26 "-X ${t}.Revision=unknown"
27 "-X ${t}.Branch=unknown"
28 "-X ${t}.BuildUser=nix@nixpkgs"
29 "-X ${t}.BuildDate=unknown"
30 ];
31
32 vendorHash = "sha256-QKDvoctvvdijQ+ZlClqTyJZfDzqAIikAwOQds9+NQIc=";
33
34 meta = {
35 description = "Receives StatsD-style metrics and exports them to Prometheus";
36 mainProgram = "statsd_exporter";
37 homepage = "https://github.com/prometheus/statsd_exporter";
38 changelog = "https://github.com/prometheus/statsd_exporter/blob/v${version}/CHANGELOG.md";
39 license = lib.licenses.asl20;
40 maintainers = with lib.maintainers; [
41 benley
42 ivan
43 ];
44 };
45}