lol
at v192 34 lines 924 B view raw
1{ stdenv, lib, go, fetchFromGitHub }: 2 3stdenv.mkDerivation rec { 4 name = "cadvisor-${version}"; 5 version = "0.10.1"; 6 7 src = fetchFromGitHub { 8 owner = "google"; 9 repo = "cadvisor"; 10 rev = "${version}"; 11 sha256 = "0k0qfhw755k3ripsfkhml0ixaglhy64hdzxrjvlmbgc50s3j37vh"; 12 }; 13 14 buildInputs = [ go ]; 15 16 buildPhase = '' 17 mkdir -p Godeps/_workspace/src/github.com/google/ 18 ln -s $(pwd) Godeps/_workspace/src/github.com/google/cadvisor 19 GOPATH=$(pwd)/Godeps/_workspace go build -v -o cadvisor github.com/google/cadvisor 20 ''; 21 22 installPhase = '' 23 mkdir -p $out/bin 24 mv cadvisor $out/bin 25 ''; 26 27 meta = with stdenv.lib; { 28 description = "Analyzes resource usage and performance characteristics of running docker containers"; 29 homepage = https://github.com/google/cadvisor; 30 license = licenses.asl20; 31 maintainers = with maintainers; [ offline ]; 32 platforms = platforms.unix; 33 }; 34}