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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9023c91eb811..16adbff85506 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7549,6 +7549,8 @@ let apacheHttpdPackages_2_2 = apacheHttpdPackagesFor pkgs.apacheHttpd_2_2 pkgs.apacheHttpdPackages_2_2; apacheHttpdPackages_2_4 = apacheHttpdPackagesFor pkgs.apacheHttpd_2_4 pkgs.apacheHttpdPackages_2_4; + cadvisor = callPackage ../servers/monitoring/cadvisor { }; + cassandra = callPackage ../servers/nosql/cassandra { }; apache-jena = callPackage ../servers/nosql/apache-jena/binary.nix {