Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
35 lines
933 B
Nix
35 lines
933 B
Nix
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
|
|
|
buildGoModule rec {
|
|
pname = "cadvisor";
|
|
version = "0.49.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "google";
|
|
repo = "cadvisor";
|
|
rev = "v${version}";
|
|
hash = "sha256-Hr9L9cewJN1ibh+6L0XhxxNAH4U8TrK+j7YBjS6FzZc=";
|
|
};
|
|
|
|
modRoot = "./cmd";
|
|
|
|
vendorHash = "sha256-9h+W+zuwxlpkBaCpk1otrBrwfyitfGLViOcZRpKB3uU=";
|
|
|
|
ldflags = [ "-s" "-w" "-X github.com/google/cadvisor/version.Version=${version}" ];
|
|
|
|
postInstall = ''
|
|
mv $out/bin/{cmd,cadvisor}
|
|
rm $out/bin/example
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests) cadvisor; };
|
|
|
|
meta = with lib; {
|
|
description = "Analyzes resource usage and performance characteristics of running docker containers";
|
|
mainProgram = "cadvisor";
|
|
homepage = "https://github.com/google/cadvisor";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ offline ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|