nixpkgs/pkgs/servers/monitoring/cadvisor/default.nix

36 lines
965 B
Nix
Raw Normal View History

{ stdenv, go, fetchFromGitHub }:
2014-12-28 20:20:38 +01:00
stdenv.mkDerivation rec {
name = "cadvisor-${version}";
version = "0.33.1";
2014-12-28 20:20:38 +01:00
src = fetchFromGitHub {
owner = "google";
repo = "cadvisor";
2016-09-15 14:28:12 +02:00
rev = "v${version}";
sha256 = "15wddg0xwkz42n5y2f72yq3imhbvnp83g1jq6p81ddw9qzbz62zs";
2014-12-28 20:20:38 +01:00
};
2018-01-27 11:10:56 +01:00
nativeBuildInputs = [ go ];
2014-12-28 20:20:38 +01:00
buildPhase = ''
export GOCACHE="$TMPDIR/go-cache"
2014-12-28 20:20:38 +01:00
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 ];
2017-05-07 23:41:39 +02:00
platforms = platforms.linux;
2014-12-28 20:20:38 +01:00
};
}