Merge pull request #193645 from aaronjheng/prometheus-pushgateway-1.4.3
prometheus-pushgateway: 1.4.0 -> 1.4.3
This commit is contained in:
commit
6fabd018af
@ -1,42 +1,31 @@
|
||||
{ lib, go, buildGoPackage, fetchFromGitHub }:
|
||||
{ lib, buildGoModule, fetchFromGitHub, testers, prometheus-pushgateway }:
|
||||
|
||||
buildGoPackage rec {
|
||||
buildGoModule rec {
|
||||
pname = "pushgateway";
|
||||
version = "1.4.0";
|
||||
rev = "v${version}";
|
||||
|
||||
goPackagePath = "github.com/prometheus/pushgateway";
|
||||
version = "1.4.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit rev;
|
||||
owner = "prometheus";
|
||||
repo = "pushgateway";
|
||||
sha256 = "sha256-230JgG+TtAuopkkcUda+0hl8E6WXOtTUygWoyorLiEU=";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-fSp173/ubeXw44IHVnuyYAYnTCrHcsq7GRwPlH05kJY=";
|
||||
};
|
||||
|
||||
buildUser = "nix@nixpkgs";
|
||||
buildDate = "19700101-00:00:00";
|
||||
vendorSha256 = "sha256-abl2L8+QY2khLnsjXWWnzs9ewbFWctiJgHE29BRR2gU=";
|
||||
|
||||
ldflags = [
|
||||
"-X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.Version=${version}"
|
||||
"-X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.Revision=${rev}"
|
||||
"-X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.Branch=${rev}"
|
||||
"-X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.BuildUser=${buildUser}"
|
||||
"-X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.BuildDate=${buildDate}"
|
||||
"-X main.goVersion=${lib.getVersion go}"
|
||||
"-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"
|
||||
];
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
export PATH=$PATH:$out/bin
|
||||
|
||||
pushgateway --help
|
||||
|
||||
# Make sure our -X options were included in the build
|
||||
for s in ${version} ${rev} ${buildUser} ${buildDate}; do
|
||||
pushgateway --version 2>&1 | fgrep -q -- "$s" || { echo "pushgateway --version output missing $s"; exit 1; }
|
||||
done
|
||||
'';
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = prometheus-pushgateway;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Allows ephemeral and batch jobs to expose metrics to Prometheus";
|
||||
|
Loading…
Reference in New Issue
Block a user