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

37 lines
910 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub }:
2014-12-28 20:20:38 +01:00
2021-01-01 18:37:38 +01:00
buildGoModule rec {
pname = "cadvisor";
2021-01-21 19:04:23 +01:00
version = "0.38.7";
2014-12-28 20:20:38 +01:00
src = fetchFromGitHub {
owner = "google";
repo = "cadvisor";
2016-09-15 14:28:12 +02:00
rev = "v${version}";
2021-01-21 19:04:23 +01:00
sha256 = "sha256-2gwN3/sYPcDy1EUxt9mYviciN9/ZVdChIsuMt3Ueq68=";
2014-12-28 20:20:38 +01:00
};
2021-01-01 18:37:38 +01:00
modRoot = "./cmd";
2014-12-28 20:20:38 +01:00
2021-01-21 19:04:23 +01:00
vendorSha256 = "sha256-FMO+wNmjFFD9+/9mhNcyZftk8ryhwFXDZeEy/h5EMWc=";
2014-12-28 20:20:38 +01:00
2021-08-26 08:45:51 +02:00
ldflags = [ "-s" "-w" "-X github.com/google/cadvisor/version.Version=${version}" ];
2014-12-28 20:20:38 +01:00
2021-01-01 18:37:38 +01:00
postInstall = ''
mv $out/bin/{cmd,cadvisor}
rm $out/bin/example
'';
preCheck = ''
rm internal/container/mesos/handler_test.go
'';
meta = with lib; {
2015-04-28 10:54:58 +02:00
description = "Analyzes resource usage and performance characteristics of running docker containers";
homepage = "https://github.com/google/cadvisor";
2014-12-28 20:20:38 +01:00
license = licenses.asl20;
maintainers = with maintainers; [ offline ];
2017-05-07 23:41:39 +02:00
platforms = platforms.linux;
2014-12-28 20:20:38 +01:00
};
}