about summary refs log tree commit diff
path: root/pkgs/servers/monitoring/prometheus/varnish-exporter.nix
blob: d83aa5b46658b5780ab176e252947c05861c63a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This file was generated by go2nix.
{ stdenv, lib, buildGoPackage, fetchFromGitHub, makeWrapper, varnish }:

buildGoPackage rec {
  name = "prometheus_varnish_exporter-${version}";
  version = "1.4";

  goPackagePath = "github.com/jonnenauha/prometheus_varnish_exporter";

  src = fetchFromGitHub {
    owner = "jonnenauha";
    repo = "prometheus_varnish_exporter";
    rev = version;
    sha256 = "12gd09858zlhn8gkkchfwxv0ca2r72s18wrsz0agfr8pd1gxqh6j";
  };

  goDeps = ./varnish-exporter_deps.nix;

  nativeBuildInputs = [ makeWrapper ];

  postInstall = ''
    wrapProgram $bin/bin/prometheus_varnish_exporter \
      --prefix PATH : "${varnish}/bin"
  '';

  doCheck = true;

  meta = {
    homepage = https://github.com/jonnenauha/prometheus_varnish_exporter;
    description = "Varnish exporter for Prometheus";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ MostAwesomeDude willibutz ];
  };
}