Files
nixpkgs/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.2 KiB
Nix
Raw Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
}:
buildGoModule rec {
pname = "blackbox_exporter";
version = "0.27.0";
rev = "v${version}";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "blackbox_exporter";
sha256 = "sha256-oIsNqET3gHSajyWTxc+zoLiKQNCIXK77jtthOwYVtQg=";
};
vendorHash = "sha256-UHm3iIQ6/clPx/VBUG4j/WLoOhFN44nbAEZk94L/9EY=";
# dns-lookup is performed for the tests
doCheck = false;
passthru.tests = { inherit (nixosTests.prometheus-exporters) blackbox; };
ldflags = [
"-s"
"-w"
"-X github.com/prometheus/common/version.Version=${version}"
"-X github.com/prometheus/common/version.Revision=${rev}"
"-X github.com/prometheus/common/version.Branch=unknown"
"-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
"-X github.com/prometheus/common/version.BuildDate=unknown"
];
meta = with lib; {
description = "Blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP and ICMP";
mainProgram = "blackbox_exporter";
homepage = "https://github.com/prometheus/blackbox_exporter";
license = licenses.asl20;
maintainers = with maintainers; [
globin
fpletz
Frostman
ma27
];
};
}