nixpkgs/pkgs/servers/monitoring/bosun/scollector.nix

33 lines
813 B
Nix
Raw Normal View History

2014-12-05 11:39:56 +00:00
{ stdenv, fetchurl, go }:
stdenv.mkDerivation rec {
name = "scollector-${version}";
version = "20141204222654";
2014-11-20 12:14:48 +00:00
src = fetchurl {
2014-12-05 11:39:56 +00:00
url = "https://github.com/bosun-monitor/bosun/archive/${version}.tar.gz";
sha256 = "1jwhfwf24zhncrirna3q1vhap4f955bqx3sws3ryk5gp1w99l36n";
2014-11-20 12:14:48 +00:00
};
buildInputs = [ go ];
sourceRoot = ".";
buildPhase = ''
2014-12-05 11:39:56 +00:00
mkdir -p src
mv bosun-${version} src/bosun.org
2014-11-20 12:14:48 +00:00
export GOPATH=$PWD
2014-12-05 11:39:56 +00:00
go build -v -o scollector src/bosun.org/cmd/scollector/main.go
2014-11-20 12:14:48 +00:00
'';
installPhase = ''
mkdir -p $out/bin
cp scollector $out/bin
'';
meta = with stdenv.lib; {
description = "Collect system information and store it in OpenTSDB or Bosun";
homepage = http://bosun.org/scollector;
license = licenses.mit;
platforms = stdenv.lib.platforms.linux;
};
2014-11-20 12:14:48 +00:00
}