nixpkgs/pkgs/by-name/pr/prometheus-pushgateway/package.nix

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

41 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, nixosTests, testers, prometheus-pushgateway }:
2022-09-30 06:55:28 +01:00
buildGoModule rec {
pname = "pushgateway";
version = "1.10.0";
src = fetchFromGitHub {
owner = "prometheus";
repo = "pushgateway";
2022-09-30 06:55:28 +01:00
rev = "v${version}";
sha256 = "sha256-Avp5hWRdkM/vCz6B/b7uOrnYjFrN5UkE7siK0+ANO1Q=";
};
vendorHash = "sha256-cyZ/LzKB3UlyqzID9f6I4niwJ/sPIm2htVOn3Ik2HAY=";
2021-08-26 04:31:57 +01:00
ldflags = [
2022-09-30 06:55:28 +01:00
"-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"
2021-08-26 04:31:57 +01:00
];
passthru.tests = {
inherit (nixosTests.prometheus) pushgateway;
version = testers.testVersion {
package = prometheus-pushgateway;
};
2022-09-30 06:55:28 +01:00
};
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 ];
};
}