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

46 lines
1.2 KiB
Nix
Raw Normal View History

2014-11-20 13:14:48 +01:00
{ stdenv, fetchgit, fetchurl, go }:
let
go-fs = fetchgit {
url = git://github.com/rakyll/statik.git;
rev = "f19d7c21cd036701d42ec176b13e0946cc9591b0";
sha256 = "0vaa8xzkmj1dgiayg7ccrniapz4f4rhsizx2hybyc5rgmalfj9ac";
};
in stdenv.mkDerivation rec {
2014-11-20 16:45:05 +01:00
name = "bosun-${version}";
version = "20141119233013";
2014-11-20 13:14:48 +01:00
src = fetchurl {
2014-11-20 16:45:05 +01:00
url = "https://github.com/bosun-monitor/bosun/archive/${version}.tar.gz";
sha256 = "0l16g073ixk42g3jz1r0lhmvssc0k8s1vnr9pvgxs897rzpdjjm1";
2014-11-20 13:14:48 +01:00
};
buildInputs = [ go ];
sourceRoot = ".";
buildPhase = ''
mkdir -p src/github.com/bosun-monitor
2014-11-20 16:45:05 +01:00
mv bosun-${version} src/github.com/bosun-monitor/bosun
2014-11-20 13:14:48 +01:00
mkdir -p src/github.com/rakyll
ln -s ${go-fs} src/github.com/rakyll/statik
export GOPATH=$PWD
go build -v -o bosun src/github.com/bosun-monitor/bosun/main.go
'';
installPhase = ''
mkdir -p $out/bin
cp bosun $out/bin
'';
meta = with stdenv.lib; {
description = "Time series alerting framework";
longDescription = ''
An advanced, open-source monitoring and alerting system by Stack Exchange.
'';
homepage = http://bosun.org;
license = licenses.mit;
platforms = ["x86_64-linux"];
};
2014-11-20 13:14:48 +01:00
}