diff options
author | Ryan Mulligan <ryan@ryantm.com> | 2019-03-08 20:57:43 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-08 20:57:43 -0800 |
commit | b7ebfec61f2f93e922ecdff60ac80a08e911b443 (patch) | |
tree | 93b685eb39fc6a27157c5ae7457512bbf42ff4bb /pkgs/servers | |
parent | 08c589b90f6a3ba4a75a05a4c03539ee663893ee (diff) | |
parent | 8b4b12ed7ad663cdcd97370daf8a0fab33c08ac3 (diff) | |
download | nixpkgs-b7ebfec61f2f93e922ecdff60ac80a08e911b443.tar nixpkgs-b7ebfec61f2f93e922ecdff60ac80a08e911b443.tar.gz nixpkgs-b7ebfec61f2f93e922ecdff60ac80a08e911b443.tar.bz2 nixpkgs-b7ebfec61f2f93e922ecdff60ac80a08e911b443.tar.lz nixpkgs-b7ebfec61f2f93e922ecdff60ac80a08e911b443.tar.xz nixpkgs-b7ebfec61f2f93e922ecdff60ac80a08e911b443.tar.zst nixpkgs-b7ebfec61f2f93e922ecdff60ac80a08e911b443.zip |
Merge pull request #55982 from ivan/pushgateway-0.7.0
prometheus-pushgateway: 0.4.0 -> 0.7.0
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/monitoring/prometheus/pushgateway.nix | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/pkgs/servers/monitoring/prometheus/pushgateway.nix b/pkgs/servers/monitoring/prometheus/pushgateway.nix index 6509f55d46e..4c6cc694243 100644 --- a/pkgs/servers/monitoring/prometheus/pushgateway.nix +++ b/pkgs/servers/monitoring/prometheus/pushgateway.nix @@ -1,8 +1,8 @@ -{ stdenv, go, buildGoPackage, go-bindata, fetchFromGitHub }: +{ stdenv, go, buildGoPackage, fetchFromGitHub }: buildGoPackage rec { name = "pushgateway-${version}"; - version = "0.4.0"; + version = "0.7.0"; rev = "v${version}"; goPackagePath = "github.com/prometheus/pushgateway"; @@ -11,33 +11,39 @@ buildGoPackage rec { inherit rev; owner = "prometheus"; repo = "pushgateway"; - sha256 = "19hsv42addcx4dsjdbh64y7ggjvaaay9gag0342gz7gyl9sr719f"; + sha256 = "1sczg6vrpxv0jlqhkif8443v7mhbp3lp40g71ndqkf1s669m1pl4"; }; - buildInputs = [ go-bindata ]; - - preBuild = '' - ( - cd "go/src/$goPackagePath" - go-bindata ./resources/ - ) - ''; + buildUser = "nix@nixpkgs"; + buildDate = "19700101-00:00:00"; buildFlagsArray = '' -ldflags= - -X main.buildVersion=${version} - -X main.buildRev=${rev} - -X main.buildBranch=${rev} - -X main.buildUser=nix@nixpkgs - -X main.buildDate=19700101-00:00:00 + -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=${stdenv.lib.getVersion go} ''; + doInstallCheck = true; + installCheckPhase = '' + export PATH=$PATH:$bin/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 + ''; + meta = with stdenv.lib; { description = "Allows ephemeral and batch jobs to expose metrics to Prometheus"; homepage = https://github.com/prometheus/pushgateway; license = licenses.asl20; - maintainers = with maintainers; [ benley fpletz ]; + maintainers = with maintainers; [ benley fpletz ivan ]; platforms = platforms.unix; }; } |