2018-07-20 17:44:44 -07:00
|
|
|
{ stdenv, go, fetchFromGitHub }:
|
2014-12-28 11:20:38 -08:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "cadvisor-${version}";
|
2018-08-08 19:28:02 -07:00
|
|
|
version = "0.30.2";
|
2014-12-28 11:20:38 -08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "cadvisor";
|
2016-09-15 05:28:12 -07:00
|
|
|
rev = "v${version}";
|
2018-08-08 19:28:02 -07:00
|
|
|
sha256 = "143jsm0pbfhsa2iwkg5zanl9qxbpmsdvay5djyac4rvgl53m0wy9";
|
2014-12-28 11:20:38 -08:00
|
|
|
};
|
|
|
|
|
2018-01-27 02:10:56 -08:00
|
|
|
nativeBuildInputs = [ go ];
|
2014-12-28 11:20:38 -08:00
|
|
|
|
|
|
|
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; {
|
2015-04-28 01:54:58 -07:00
|
|
|
description = "Analyzes resource usage and performance characteristics of running docker containers";
|
2014-12-28 11:20:38 -08:00
|
|
|
homepage = https://github.com/google/cadvisor;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ offline ];
|
2017-05-07 14:41:39 -07:00
|
|
|
platforms = platforms.linux;
|
2014-12-28 11:20:38 -08:00
|
|
|
};
|
|
|
|
}
|