depot/third_party/nixpkgs/pkgs/servers/monitoring/prometheus/pushgateway.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

37 lines
1.1 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, testers, prometheus-pushgateway }:
buildGoModule rec {
pname = "pushgateway";
version = "1.9.0";
src = fetchFromGitHub {
owner = "prometheus";
repo = "pushgateway";
rev = "v${version}";
sha256 = "sha256-SpHxBxBl0APP/y7MnR/p/+VjNAvFOZVlgGMlMGTbodI=";
};
vendorHash = "sha256-GydAY73Ui6z833x0DoWa6BpK35CYdYfyHw2+RwT3miw=";
ldflags = [
"-s"
"-w"
"-X github.com/prometheus/common/version.Version=${version}"
"-X github.com/prometheus/common/version.Revision=${version}"
"-X github.com/prometheus/common/version.Branch=${version}"
"-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
"-X github.com/prometheus/common/version.BuildDate=19700101-00:00:00"
];
passthru.tests.version = testers.testVersion {
package = prometheus-pushgateway;
};
meta = with lib; {
description = "Allows ephemeral and batch jobs to expose metrics to Prometheus";
mainProgram = "pushgateway";
homepage = "https://github.com/prometheus/pushgateway";
license = licenses.asl20;
maintainers = with maintainers; [ benley ];
};
}