nixpkgs/pkgs/servers/monitoring/cadvisor/default.nix
R. RyanTM caf9e0abe6 cadvisor: 0.33.0 -> 0.33.1
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/cadvisor/versions
2019-04-14 02:59:00 -07:00

36 lines
965 B
Nix

{ stdenv, go, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "cadvisor-${version}";
version = "0.33.1";
src = fetchFromGitHub {
owner = "google";
repo = "cadvisor";
rev = "v${version}";
sha256 = "15wddg0xwkz42n5y2f72yq3imhbvnp83g1jq6p81ddw9qzbz62zs";
};
nativeBuildInputs = [ go ];
buildPhase = ''
export GOCACHE="$TMPDIR/go-cache"
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.linux;
};
}