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

35 lines
932 B
Nix
Raw Normal View History

2014-12-28 20:20:38 +01:00
{ stdenv, lib, go, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "cadvisor-${version}";
2018-01-27 11:10:56 +01:00
version = "0.28.3";
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}";
2018-01-27 11:10:56 +01:00
sha256 = "1rdw09cbhs4il63lv1f92dw8pav9rjnkbrqx37lqij8x6xmv01gy";
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 = ''
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
};
}