nixpkgs/pkgs/servers/monitoring/cadvisor/default.nix

37 lines
935 B
Nix
Raw Normal View History

2021-01-01 17:37:38 +00:00
{ stdenv, buildGoModule, fetchFromGitHub }:
2014-12-28 19:20:38 +00:00
2021-01-01 17:37:38 +00:00
buildGoModule rec {
pname = "cadvisor";
2021-01-01 17:37:38 +00:00
version = "0.37.0";
2014-12-28 19:20:38 +00:00
src = fetchFromGitHub {
owner = "google";
repo = "cadvisor";
2016-09-15 13:28:12 +01:00
rev = "v${version}";
2021-01-01 17:37:38 +00:00
sha256 = "15njzwvsl7jc2hgxlpsksmn7md3bqpavzaskfdlmzxnxp3biw3cj";
2014-12-28 19:20:38 +00:00
};
2021-01-01 17:37:38 +00:00
modRoot = "./cmd";
2014-12-28 19:20:38 +00:00
2021-01-01 17:37:38 +00:00
vendorSha256 = "1vbydwj3xrz2gimwfasiqiwzsdiplaq7imildzr4wspkk64dprf4";
2014-12-28 19:20:38 +00:00
buildFlagsArray = [ "-ldflags=-s -w -X github.com/google/cadvisor/version.Version=${version}" ];
2014-12-28 19:20:38 +00:00
2021-01-01 17:37:38 +00:00
postInstall = ''
mv $out/bin/{cmd,cadvisor}
rm $out/bin/example
'';
preCheck = ''
rm internal/container/mesos/handler_test.go
'';
2014-12-28 19:20:38 +00:00
meta = with stdenv.lib; {
2015-04-28 09:54:58 +01:00
description = "Analyzes resource usage and performance characteristics of running docker containers";
homepage = "https://github.com/google/cadvisor";
2014-12-28 19:20:38 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ offline ];
2017-05-07 22:41:39 +01:00
platforms = platforms.linux;
2014-12-28 19:20:38 +00:00
};
}