Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 08c589b90f6a
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b7ebfec61f2f
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Feb 18, 2019

  1. prometheus-pushgateway: 0.4.0 -> 0.7.0

    Add some tests to make sure the --version output includes the values
    passed in with -X.
    
    Add myself as a maintainer.
    ivan committed Feb 18, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    8b4b12e View commit details

Commits on Mar 9, 2019

  1. Merge pull request #55982 from ivan/pushgateway-0.7.0

    prometheus-pushgateway: 0.4.0 -> 0.7.0
    ryantm authored Mar 9, 2019

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    b7ebfec View commit details
Showing with 23 additions and 17 deletions.
  1. +23 −17 pkgs/servers/monitoring/prometheus/pushgateway.nix
40 changes: 23 additions & 17 deletions pkgs/servers/monitoring/prometheus/pushgateway.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}