cadvisor: 0.34.0 -> 0.35.0 (#76162)

cadvisor: 0.34.0 -> 0.35.0
This commit is contained in:
Jörg Thalheim 2019-12-22 09:01:35 +00:00 committed by GitHub
commit d60eea96a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,32 +1,21 @@
{ stdenv, go, fetchFromGitHub }:
{ stdenv, buildGoPackage, fetchFromGitHub }:
stdenv.mkDerivation rec {
buildGoPackage rec {
pname = "cadvisor";
version = "0.34.0";
version = "0.35.0";
src = fetchFromGitHub {
owner = "google";
repo = "cadvisor";
rev = "v${version}";
sha256 = "1hshmhsclja50ja2jqxx2f5lcvbs64n6aw6dw28wbnq3z9v0q8ad";
sha256 = "1652yf2a4ng9z0jq8q6jnzh6svj5nwar9j8q7sssgy36bi03ixqa";
};
nativeBuildInputs = [ go ];
goPackagePath = "github.com/google/cadvisor";
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 -ldflags="-s -w -X github.com/google/cadvisor/version.Version=${version}" github.com/google/cadvisor
'';
subPackages = [ "." ];
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin cadvisor
runHook postInstall
'';
buildFlagsArray = [ "-ldflags=-s -w -X github.com/google/cadvisor/version.Version=${version}" ];
meta = with stdenv.lib; {
description = "Analyzes resource usage and performance characteristics of running docker containers";