prometheus-collectd-exporter: use buildGoModule

This commit is contained in:
Aaron Jheng 2022-09-29 11:47:57 +00:00
parent dbed7c274f
commit 4d394c2a73
No known key found for this signature in database
GPG key ID: F6A547A869D050A3

View file

@ -1,19 +1,20 @@
{ lib, buildGoPackage, fetchFromGitHub, nixosTests }: { lib, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoPackage rec { buildGoModule rec {
pname = "collectd-exporter"; pname = "collectd-exporter";
version = "0.5.0"; version = "0.5.0";
rev = version;
goPackagePath = "github.com/prometheus/collectd_exporter";
src = fetchFromGitHub { src = fetchFromGitHub {
rev = "v${version}";
owner = "prometheus"; owner = "prometheus";
repo = "collectd_exporter"; repo = "collectd_exporter";
rev = "v${version}";
sha256 = "0vb6vnd2j87iqxdl86j30dk65vrv4scprv200xb83203aprngqgh"; sha256 = "0vb6vnd2j87iqxdl86j30dk65vrv4scprv200xb83203aprngqgh";
}; };
vendorSha256 = null;
ldflags = [ "-s" "-w" ];
passthru.tests = { inherit (nixosTests.prometheus-exporters) collectd; }; passthru.tests = { inherit (nixosTests.prometheus-exporters) collectd; };
meta = with lib; { meta = with lib; {