Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

51 lines
1.1 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "mysqld_exporter";
version = "0.18.0";
src = fetchFromGitHub {
owner = "prometheus";
repo = "mysqld_exporter";
tag = "v${version}";
hash = "sha256-uHr9hVjnQx1DIr7ByaqgmR4YOvCYo49+b+Ikh+Vlh+o=";
};
vendorHash = "sha256-fM3CqyOEKYJOFkEwBE7/yIQEKUUIbBIbmHQp12/psas=";
ldflags =
let
t = "github.com/prometheus/common/version";
in
[
"-s"
"-w"
"-X ${t}.Version=${version}"
"-X ${t}.Revision=${src.rev}"
"-X ${t}.Branch=unknown"
"-X ${t}.BuildUser=nix@nixpkgs"
"-X ${t}.BuildDate=unknown"
];
# skips tests with external dependencies, e.g. on mysqld
checkFlags = [
"-short"
];
meta = with lib; {
changelog = "https://github.com/prometheus/mysqld_exporter/blob/${src.tag}/CHANGELOG.md";
description = "Prometheus exporter for MySQL server metrics";
mainProgram = "mysqld_exporter";
homepage = "https://github.com/prometheus/mysqld_exporter";
license = licenses.asl20;
maintainers = with maintainers; [
benley
globin
];
};
}