2016-11-27 08:10:48 +00:00
|
|
|
# This file was generated by go2nix.
|
2018-05-01 15:04:28 +01:00
|
|
|
{ stdenv, lib, buildGoPackage, fetchFromGitHub, makeWrapper, varnish }:
|
2016-11-27 08:10:48 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
name = "prometheus_varnish_exporter-${version}";
|
2018-05-01 15:04:28 +01:00
|
|
|
version = "1.4";
|
2016-11-27 08:10:48 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/jonnenauha/prometheus_varnish_exporter";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jonnenauha";
|
|
|
|
repo = "prometheus_varnish_exporter";
|
2018-05-01 15:04:28 +01:00
|
|
|
rev = version;
|
|
|
|
sha256 = "12gd09858zlhn8gkkchfwxv0ca2r72s18wrsz0agfr8pd1gxqh6j";
|
2016-11-27 08:10:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
goDeps = ./varnish-exporter_deps.nix;
|
|
|
|
|
2018-05-01 15:04:28 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $bin/bin/prometheus_varnish_exporter \
|
|
|
|
--prefix PATH : "${varnish}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2016-11-27 08:10:48 +00:00
|
|
|
meta = {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://github.com/jonnenauha/prometheus_varnish_exporter;
|
2016-11-27 08:10:48 +00:00
|
|
|
description = "Varnish exporter for Prometheus";
|
|
|
|
license = lib.licenses.mit;
|
2018-05-01 15:04:28 +01:00
|
|
|
maintainers = with lib.maintainers; [ MostAwesomeDude willibutz ];
|
2016-11-27 08:10:48 +00:00
|
|
|
};
|
|
|
|
}
|