git.iko.soy/typeable/nixpkgs
on master help sign in
cadvisor: 0.34.0 -> 0.35.0
bce8090Mario Rodas
pkgs/servers/monitoring/cadvisor/default.nix+7−18
@@ -1,32 +1,21 @@
1−{ stdenv, go, fetchFromGitHub }:
1+{ stdenv, buildGoPackage, fetchFromGitHub }:
2
2
3−stdenv.mkDerivation rec {
3+buildGoPackage rec {
4 pname = "cadvisor";
4 pname = "cadvisor";
5− version = "0.34.0";
5+ version = "0.35.0";
6
6
7 src = fetchFromGitHub {
7 src = fetchFromGitHub {
8 owner = "google";
8 owner = "google";
9 repo = "cadvisor";
9 repo = "cadvisor";
10 rev = "v${version}";
10 rev = "v${version}";
11− sha256 = "1hshmhsclja50ja2jqxx2f5lcvbs64n6aw6dw28wbnq3z9v0q8ad";
11+ sha256 = "1652yf2a4ng9z0jq8q6jnzh6svj5nwar9j8q7sssgy36bi03ixqa";
12 };
12 };
13
13
14− nativeBuildInputs = [ go ];
14+ goPackagePath = "github.com/google/cadvisor";
15
15
16− buildPhase = ''
16+ subPackages = [ "." ];
17− export GOCACHE="$TMPDIR/go-cache"
18− mkdir -p Godeps/_workspace/src/github.com/google/
19− ln -s $(pwd) Godeps/_workspace/src/github.com/google/cadvisor
20− GOPATH=$(pwd)/Godeps/_workspace go build -v -o cadvisor -ldflags="-s -w -X github.com/google/cadvisor/version.Version=${version}" github.com/google/cadvisor
21− '';
22
17
23− installPhase = ''
18+ buildFlagsArray = [ "-ldflags=-s -w -X github.com/google/cadvisor/version.Version=${version}" ];
24− runHook preInstall
25−
26− install -Dm755 -t $out/bin cadvisor
27−
28− runHook postInstall
29− '';
30
19
31 meta = with stdenv.lib; {
20 meta = with stdenv.lib; {
32 description = "Analyzes resource usage and performance characteristics of running docker containers";
21 description = "Analyzes resource usage and performance characteristics of running docker containers";