2014-12-28 20:20:38 +01:00
|
|
|
{ stdenv, lib, go, fetchFromGitHub }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "cadvisor-${version}";
|
2015-03-18 14:38:46 +01:00
|
|
|
version = "0.10.1";
|
2014-12-28 20:20:38 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "cadvisor";
|
|
|
|
rev = "${version}";
|
2015-03-18 14:38:46 +01:00
|
|
|
sha256 = "0k0qfhw755k3ripsfkhml0ixaglhy64hdzxrjvlmbgc50s3j37vh";
|
2014-12-28 20:20:38 +01: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 10:54:58 +02:00
|
|
|
description = "Analyzes resource usage and performance characteristics of running docker containers";
|
2014-12-28 20:20:38 +01:00
|
|
|
homepage = https://github.com/google/cadvisor;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ offline ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|