1 { lib, buildGoModule, fetchFromGitHub }:
4 pname = "mysqld_exporter";
7 src = fetchFromGitHub {
9 repo = "mysqld_exporter";
11 sha256 = "sha256-P7EoWa0BWuAr3sjtrUxzofwlklhRLpzwpGVe31hFo7Q=";
14 vendorHash = "sha256-GEL9sMwwdGqpklm4yKNqzSOM6I/JzZjg3+ZB2ix2M8w=";
16 ldflags = let t = "github.com/prometheus/common/version"; in [
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"
25 # skips tests with external dependencies, e.g. on mysqld
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 ];