Merge pull request #5491 from offlinehacker/cadvisor

Add cadvisor package and nixos module
This commit is contained in:
Jaka Hudoklin
2014-12-29 17:58:43 +01:00
7 changed files with 175 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
{ stdenv, lib, go, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "cadvisor-${version}";
version = "0.7.1";
src = fetchFromGitHub {
owner = "google";
repo = "cadvisor";
rev = "${version}";
sha256 = "1vc9fydi6wra45khxsmfw5mx2qyggi7cg6kgajzw518rqa52ivmg";
};
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; {
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.unix;
};
}