2014-12-28 19:20:38 +00:00
|
|
|
{ stdenv, lib, go, fetchFromGitHub }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "cadvisor-${version}";
|
2017-09-05 12:51:28 +01:00
|
|
|
version = "0.26.1";
|
2014-12-28 19:20:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "cadvisor";
|
2016-09-15 13:28:12 +01:00
|
|
|
rev = "v${version}";
|
2017-09-05 12:51:28 +01:00
|
|
|
sha256 = "0rv245acz2r12c6ga2ln01961sh36w15ay0nfpfcg8inz679dnvg";
|
2014-12-28 19:20:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ 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; {
|
2015-04-28 09:54:58 +01:00
|
|
|
description = "Analyzes resource usage and performance characteristics of running docker containers";
|
2014-12-28 19:20:38 +00:00
|
|
|
homepage = https://github.com/google/cadvisor;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ offline ];
|
2017-05-07 22:41:39 +01:00
|
|
|
platforms = platforms.linux;
|
2014-12-28 19:20:38 +00:00
|
|
|
};
|
|
|
|
}
|