mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
33 lines
940 B
Nix
33 lines
940 B
Nix
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, varnish, nixosTests }:
|
|
|
|
buildGoModule rec {
|
|
pname = "prometheus_varnish_exporter";
|
|
version = "1.6.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jonnenauha";
|
|
repo = "prometheus_varnish_exporter";
|
|
rev = version;
|
|
hash = "sha256-1sUzKLNkLP/eX0wYSestMAJpjAmX1iimjYoFYb6Mgpc=";
|
|
};
|
|
|
|
vendorHash = "sha256-P2fR0U2O0Y4Mci9jkAMb05WR+PrpuQ59vbLMG5b9KQI=";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/prometheus_varnish_exporter \
|
|
--prefix PATH : "${varnish}/bin"
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) varnish; };
|
|
|
|
meta = {
|
|
homepage = "https://github.com/jonnenauha/prometheus_varnish_exporter";
|
|
description = "Varnish exporter for Prometheus";
|
|
mainProgram = "prometheus_varnish_exporter";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ MostAwesomeDude ];
|
|
};
|
|
}
|