forked from mirrors/nixpkgs
Fix and port bosun and scollector to buildGoPackage
This commit is contained in:
parent
9896829c49
commit
df097fe2c3
|
@ -1,29 +1,20 @@
|
||||||
{ stdenv, fetchurl, go }:
|
{ lib, fetchFromGitHub, goPackages }:
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
name = "bosun-${version}";
|
with goPackages;
|
||||||
version = "20141215200935";
|
|
||||||
src = fetchurl {
|
buildGoPackage rec {
|
||||||
url = "https://github.com/bosun-monitor/bosun/archive/${version}.tar.gz";
|
rev = "20150202222550";
|
||||||
sha256 = "1py4plx5wi4mp05g4c1aa1wa8ny538kp2p4fzhalz33zm2qxbbx9";
|
name = "bosun-${rev}";
|
||||||
|
goPackagePath = "bosun.org";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
inherit rev;
|
||||||
|
owner = "bosun-monitor";
|
||||||
|
repo = "bosun";
|
||||||
|
sha256 = "0xrnyq85nxj6rddrhd19r2bz59pzxci6bnjh61j4z8hd6ryp8j2c";
|
||||||
};
|
};
|
||||||
buildInputs = [ go ];
|
subPackages = [ "cmd/bosun" ];
|
||||||
|
|
||||||
sourceRoot = ".";
|
meta = with lib; {
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
mkdir -p src
|
|
||||||
mv bosun-${version} src/bosun.org
|
|
||||||
|
|
||||||
export GOPATH=$PWD
|
|
||||||
go build -v -o bosun src/bosun.org/cmd/bosun/main.go
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp bosun $out/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = "Time series alerting framework";
|
description = "Time series alerting framework";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
An advanced, open-source monitoring and alerting system by Stack Exchange.
|
An advanced, open-source monitoring and alerting system by Stack Exchange.
|
||||||
|
|
|
@ -1,32 +1,23 @@
|
||||||
{ stdenv, fetchurl, go }:
|
{ lib, fetchFromGitHub, goPackages }:
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
name = "scollector-${version}";
|
with goPackages;
|
||||||
version = "20141204222654";
|
|
||||||
src = fetchurl {
|
buildGoPackage rec {
|
||||||
url = "https://github.com/bosun-monitor/bosun/archive/${version}.tar.gz";
|
rev = "20150202222550";
|
||||||
sha256 = "1jwhfwf24zhncrirna3q1vhap4f955bqx3sws3ryk5gp1w99l36n";
|
name = "bosun-${rev}";
|
||||||
|
goPackagePath = "bosun.org";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
inherit rev;
|
||||||
|
owner = "bosun-monitor";
|
||||||
|
repo = "bosun";
|
||||||
|
sha256 = "0xrnyq85nxj6rddrhd19r2bz59pzxci6bnjh61j4z8hd6ryp8j2c";
|
||||||
};
|
};
|
||||||
buildInputs = [ go ];
|
subPackages = [ "cmd/scollector" ];
|
||||||
|
|
||||||
sourceRoot = ".";
|
meta = with lib; {
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
mkdir -p src
|
|
||||||
mv bosun-${version} src/bosun.org
|
|
||||||
|
|
||||||
export GOPATH=$PWD
|
|
||||||
go build -v -o scollector src/bosun.org/cmd/scollector/main.go
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp scollector $out/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = "Collect system information and store it in OpenTSDB or Bosun";
|
description = "Collect system information and store it in OpenTSDB or Bosun";
|
||||||
homepage = http://bosun.org/scollector;
|
homepage = http://bosun.org/scollector;
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue