diff options
author | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-12-29 17:58:43 +0100 |
---|---|---|
committer | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-12-29 17:58:43 +0100 |
commit | 1b19b7a3bfaefdf17c3e5547d2214725d3d82ee2 (patch) | |
tree | ef36c226d149229d89549cf358fa2905b6c6aff0 /pkgs/servers | |
parent | 2386eff378c44f5712b9df7fbb5a4c38b5526863 (diff) | |
parent | b6198f08e3cdbf607d9bcae4ddc2a836c59be2eb (diff) | |
download | nixlib-1b19b7a3bfaefdf17c3e5547d2214725d3d82ee2.tar nixlib-1b19b7a3bfaefdf17c3e5547d2214725d3d82ee2.tar.gz nixlib-1b19b7a3bfaefdf17c3e5547d2214725d3d82ee2.tar.bz2 nixlib-1b19b7a3bfaefdf17c3e5547d2214725d3d82ee2.tar.lz nixlib-1b19b7a3bfaefdf17c3e5547d2214725d3d82ee2.tar.xz nixlib-1b19b7a3bfaefdf17c3e5547d2214725d3d82ee2.tar.zst nixlib-1b19b7a3bfaefdf17c3e5547d2214725d3d82ee2.zip |
Merge pull request #5491 from offlinehacker/cadvisor
Add cadvisor package and nixos module
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/monitoring/cadvisor/default.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/servers/monitoring/cadvisor/default.nix b/pkgs/servers/monitoring/cadvisor/default.nix new file mode 100644 index 000000000000..b7dbdb893f1a --- /dev/null +++ b/pkgs/servers/monitoring/cadvisor/default.nix @@ -0,0 +1,34 @@ +{ stdenv, lib, go, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "cadvisor-${version}"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "google"; + repo = "cadvisor"; + rev = "${version}"; + sha256 = "1vc9fydi6wra45khxsmfw5mx2qyggi7cg6kgajzw518rqa52ivmg"; + }; + + buildInputs = [ go ]; + + buildPhase = '' + 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.unix; + }; +} |