2019-01-10 19:11:31 -08:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
2016-06-05 06:52:16 -07:00
|
|
|
|
2019-01-10 19:11:31 -08:00
|
|
|
buildGoPackage rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "node_exporter";
|
2019-06-25 00:17:51 -07:00
|
|
|
version = "0.18.1";
|
2016-11-30 16:34:21 -08:00
|
|
|
rev = "v${version}";
|
2016-06-28 06:32:22 -07:00
|
|
|
|
2016-06-05 06:52:16 -07:00
|
|
|
goPackagePath = "github.com/prometheus/node_exporter";
|
|
|
|
|
2016-06-06 03:26:56 -07:00
|
|
|
src = fetchFromGitHub {
|
2016-06-05 06:52:16 -07:00
|
|
|
inherit rev;
|
2016-06-06 03:26:56 -07:00
|
|
|
owner = "prometheus";
|
|
|
|
repo = "node_exporter";
|
2019-06-25 00:17:51 -07:00
|
|
|
sha256 = "0s3sp1gj86p7npxl38hkgs6ymd3wjjmc5hydyg1b5wh0x3yvpx07";
|
2016-06-05 06:52:16 -07:00
|
|
|
};
|
|
|
|
|
2018-06-18 10:21:20 -07:00
|
|
|
# FIXME: tests fail due to read-only nix store
|
2016-06-28 06:32:22 -07:00
|
|
|
doCheck = false;
|
2016-06-05 06:52:16 -07:00
|
|
|
|
2019-06-25 00:17:46 -07:00
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X ${goPackagePath}/vendor/github.com/prometheus/common/version.Version=${version}
|
|
|
|
-X ${goPackagePath}/vendor/github.com/prometheus/common/version.Revision=${rev}
|
|
|
|
'';
|
|
|
|
|
2016-06-05 06:52:16 -07:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Prometheus exporter for machine metrics";
|
|
|
|
homepage = https://github.com/prometheus/node_exporter;
|
|
|
|
license = licenses.asl20;
|
2019-08-20 10:36:05 -07:00
|
|
|
maintainers = with maintainers; [ benley fpletz globin ];
|
2016-06-05 06:52:16 -07:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|