nixpkgs/pkgs/servers/monitoring/prometheus/mysqld-exporter.nix
Mario Rodas 7d179051fc
Merge pull request #173835 from aaronjheng/check-flags
Stop using ineffective check flags
2022-05-28 11:12:56 -05:00

39 lines
1015 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "mysqld_exporter";
version = "0.14.0";
rev = "v${version}";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "mysqld_exporter";
sha256 = "sha256-SMcpQNygv/jVLNuQP8V6BH/CmSt5Y4dzYPsboTH2dos=";
};
vendorSha256 = "sha256-M6u+ZBEUqCd6cKVHPvHqRiXLbuWz66GK+ybIQm+5tQE=";
ldflags = let t = "github.com/prometheus/common/version"; in [
"-s" "-w"
"-X ${t}.Version=${version}"
"-X ${t}.Revision=${rev}"
"-X ${t}.Branch=unknown"
"-X ${t}.BuildUser=nix@nixpkgs"
"-X ${t}.BuildDate=unknown"
];
# skips tests with external dependencies, e.g. on mysqld
preCheck = ''
buildFlagsArray+="-short"
'';
meta = with lib; {
description = "Prometheus exporter for MySQL server metrics";
homepage = "https://github.com/prometheus/mysqld_exporter";
license = licenses.asl20;
maintainers = with maintainers; [ benley globin ];
platforms = platforms.unix;
};
}