2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
2014-12-28 19:20:38 +00:00
|
|
|
|
2021-01-01 17:37:38 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "cadvisor";
|
2022-11-09 15:50:15 +00:00
|
|
|
version = "0.46.0";
|
2014-12-28 19:20:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "cadvisor";
|
2016-09-15 12:28:12 +00:00
|
|
|
rev = "v${version}";
|
2022-11-09 15:50:15 +00:00
|
|
|
sha256 = "sha256-ciGj8SK7OgK3x8Njih4aIQ0vvNV9s5/w2i+DF/vw1O8=";
|
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
|
|
|
|
2022-11-09 15:50:15 +00:00
|
|
|
vendorSha256 = "sha256-dg+osxsxdJ8Tg++wdd4L6FMjiPLLFQj0NXb2aSC7vQg=";
|
2014-12-28 19:20:38 +00:00
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-04-28 08:54:58 +00:00
|
|
|
description = "Analyzes resource usage and performance characteristics of running docker containers";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/google/cadvisor";
|
2014-12-28 19:20:38 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ offline ];
|
2017-05-07 21:41:39 +00:00
|
|
|
platforms = platforms.linux;
|
2014-12-28 19:20:38 +00:00
|
|
|
};
|
|
|
|
}
|