mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 14:43:37 +00:00
37 lines
923 B
Nix
37 lines
923 B
Nix
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
buildGoModule rec {
|
|
pname = "cadvisor";
|
|
version = "0.38.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "google";
|
|
repo = "cadvisor";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-2gwN3/sYPcDy1EUxt9mYviciN9/ZVdChIsuMt3Ueq68=";
|
|
};
|
|
|
|
modRoot = "./cmd";
|
|
|
|
vendorSha256 = "sha256-FMO+wNmjFFD9+/9mhNcyZftk8ryhwFXDZeEy/h5EMWc=";
|
|
|
|
buildFlagsArray = [ "-ldflags=-s -w -X github.com/google/cadvisor/version.Version=${version}" ];
|
|
|
|
postInstall = ''
|
|
mv $out/bin/{cmd,cadvisor}
|
|
rm $out/bin/example
|
|
'';
|
|
|
|
preCheck = ''
|
|
rm internal/container/mesos/handler_test.go
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Analyzes resource usage and performance characteristics of running docker containers";
|
|
homepage = "https://github.com/google/cadvisor";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ offline ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|