2021-05-11 03:55:19 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2016-12-01 00:38:03 +00:00
|
|
|
|
2021-05-11 03:55:19 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "blackbox_exporter";
|
2022-03-21 16:53:52 +00:00
|
|
|
version = "0.20.0";
|
2022-04-03 08:03:43 +00:00
|
|
|
rev = "v${version}";
|
2016-12-01 00:38:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-04-03 08:03:43 +00:00
|
|
|
inherit rev;
|
2016-12-01 00:38:03 +00:00
|
|
|
owner = "prometheus";
|
|
|
|
repo = "blackbox_exporter";
|
2022-03-21 16:53:52 +00:00
|
|
|
sha256 = "sha256-Y3HdFIChkQVooxy2I2Gbqw3WLHsI4Zm+osHTzFluRZA=";
|
2016-12-01 00:38:03 +00:00
|
|
|
};
|
|
|
|
|
2022-03-21 16:53:52 +00:00
|
|
|
vendorSha256 = "sha256-KFLR0In4txQQp5dt8P0yAFtf82b4SBq2xMnlz+vMuuU=";
|
2021-05-11 03:55:19 +00:00
|
|
|
|
2019-11-11 18:49:38 +00:00
|
|
|
# dns-lookup is performed for the tests
|
|
|
|
doCheck = false;
|
2019-08-11 09:50:09 +00:00
|
|
|
|
2020-06-18 10:48:40 +00:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) blackbox; };
|
|
|
|
|
2022-04-03 08:03:43 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-12-01 00:38:03 +00:00
|
|
|
description = "Blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP and ICMP";
|
2019-08-11 09:50:09 +00:00
|
|
|
homepage = "https://github.com/prometheus/blackbox_exporter";
|
2016-12-01 00:38:03 +00:00
|
|
|
license = licenses.asl20;
|
2022-04-03 08:03:43 +00:00
|
|
|
maintainers = with maintainers; [ globin fpletz willibutz Frostman ma27 ];
|
2016-12-01 00:38:03 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|