lint-staged: 15.2.10 -> 15.2.11 (#364089)
[NixPkgs.git] / pkgs / servers / monitoring / prometheus / mysqld-exporter.nix
blobe23db58e2bc339dd2ef33fcfb3eab940e412168b
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5 }:
7 buildGoModule rec {
8   pname = "mysqld_exporter";
9   version = "0.16.0";
11   src = fetchFromGitHub {
12     owner = "prometheus";
13     repo = "mysqld_exporter";
14     rev = "v${version}";
15     sha256 = "sha256-2D868CSRoJjgDh0SkpDCTLTVbJ/0kWmLQJMyAKh6s/8=";
16   };
18   vendorHash = "sha256-9mrvqY0wtoMVAL0PEJ/NWtFzaQPcQDAJvYPluwd2Nx4=";
20   ldflags =
21     let
22       t = "github.com/prometheus/common/version";
23     in
24     [
25       "-s"
26       "-w"
27       "-X ${t}.Version=${version}"
28       "-X ${t}.Revision=${src.rev}"
29       "-X ${t}.Branch=unknown"
30       "-X ${t}.BuildUser=nix@nixpkgs"
31       "-X ${t}.BuildDate=unknown"
32     ];
34   # skips tests with external dependencies, e.g. on mysqld
35   checkFlags = [
36     "-short"
37   ];
39   meta = with lib; {
40     description = "Prometheus exporter for MySQL server metrics";
41     mainProgram = "mysqld_exporter";
42     homepage = "https://github.com/prometheus/mysqld_exporter";
43     license = licenses.asl20;
44     maintainers = with maintainers; [
45       benley
46       globin
47     ];
48   };