Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / monitoring / prometheus / mysqld-exporter.nix
blobbfc2acad249695c1e21690386f5a3c320fd4eb7e
1 { lib, buildGoModule, fetchFromGitHub }:
3 buildGoModule rec {
4   pname = "mysqld_exporter";
5   version = "0.15.1";
7   src = fetchFromGitHub {
8     owner = "prometheus";
9     repo = "mysqld_exporter";
10     rev = "v${version}";
11     sha256 = "sha256-P7EoWa0BWuAr3sjtrUxzofwlklhRLpzwpGVe31hFo7Q=";
12   };
14   vendorHash = "sha256-GEL9sMwwdGqpklm4yKNqzSOM6I/JzZjg3+ZB2ix2M8w=";
16   ldflags = let t = "github.com/prometheus/common/version"; in [
17     "-s" "-w"
18     "-X ${t}.Version=${version}"
19     "-X ${t}.Revision=${src.rev}"
20     "-X ${t}.Branch=unknown"
21     "-X ${t}.BuildUser=nix@nixpkgs"
22     "-X ${t}.BuildDate=unknown"
23   ];
25   # skips tests with external dependencies, e.g. on mysqld
26   checkFlags = [
27     "-short"
28   ];
30   meta = with lib; {
31     description = "Prometheus exporter for MySQL server metrics";
32     mainProgram = "mysqld_exporter";
33     homepage = "https://github.com/prometheus/mysqld_exporter";
34     license = licenses.asl20;
35     maintainers = with maintainers; [ benley globin ];
36   };