forked from mirrors/nixpkgs
bc7ca17345
Semi-automatic update. These checks were done: - built on NixOS - Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.) - found 0.29.1 with grep in /nix/store/8zpvaz7imhsknld6d0qyykqw9b718lxi-cadvisor-0.29.1 - found 0.29.1 in filename of file in /nix/store/8zpvaz7imhsknld6d0qyykqw9b718lxi-cadvisor-0.29.1
35 lines
932 B
Nix
35 lines
932 B
Nix
{ stdenv, lib, go, fetchFromGitHub }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "cadvisor-${version}";
|
|
version = "0.29.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "google";
|
|
repo = "cadvisor";
|
|
rev = "v${version}";
|
|
sha256 = "132mpcp35cymm2zqig0yrvhnvgn72k7cmn6gla0v7r0yxfl879m3";
|
|
};
|
|
|
|
nativeBuildInputs = [ go ];
|
|
|
|
buildPhase = ''
|
|
mkdir -p Godeps/_workspace/src/github.com/google/
|
|
ln -s $(pwd) Godeps/_workspace/src/github.com/google/cadvisor
|
|
GOPATH=$(pwd)/Godeps/_workspace go build -v -o cadvisor github.com/google/cadvisor
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
mv cadvisor $out/bin
|
|
'';
|
|
|
|
meta = with stdenv.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;
|
|
};
|
|
}
|