lol

Merge pull request #167010 from Ma27/blackbox-exporter-version

prometheus-backbox-exporter: correctly expose version info

authored by

Maximilian Bosch and committed by
GitHub
74d3d121 9ae3813c

+13 -2
+13 -2
pkgs/servers/monitoring/prometheus/blackbox-exporter.nix
··· 3 3 buildGoModule rec { 4 4 pname = "blackbox_exporter"; 5 5 version = "0.20.0"; 6 + rev = "v${version}"; 6 7 7 8 src = fetchFromGitHub { 8 - rev = "v${version}"; 9 + inherit rev; 9 10 owner = "prometheus"; 10 11 repo = "blackbox_exporter"; 11 12 sha256 = "sha256-Y3HdFIChkQVooxy2I2Gbqw3WLHsI4Zm+osHTzFluRZA="; ··· 18 19 19 20 passthru.tests = { inherit (nixosTests.prometheus-exporters) blackbox; }; 20 21 22 + ldflags = [ 23 + "-s" 24 + "-w" 25 + "-X github.com/prometheus/common/version.Version=${version}" 26 + "-X github.com/prometheus/common/version.Revision=${rev}" 27 + "-X github.com/prometheus/common/version.Branch=unknown" 28 + "-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs" 29 + "-X github.com/prometheus/common/version.BuildDate=unknown" 30 + ]; 31 + 21 32 meta = with lib; { 22 33 description = "Blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP and ICMP"; 23 34 homepage = "https://github.com/prometheus/blackbox_exporter"; 24 35 license = licenses.asl20; 25 - maintainers = with maintainers; [ globin fpletz willibutz Frostman ]; 36 + maintainers = with maintainers; [ globin fpletz willibutz Frostman ma27 ]; 26 37 platforms = platforms.unix; 27 38 }; 28 39 }