forked from mirrors/nixpkgs
cadvisor: 0.34.0 -> 0.35.0
Changelog: https://github.com/google/cadvisor/releases/tag/v0.35.0
This commit is contained in:
parent
95dfa8b8cf
commit
bce8090922
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue