2016-06-06 01:28:52 +01:00
|
|
|
{ lib, buildGoPackage, fetchurl, fetchFromGitHub }:
|
2015-11-16 13:28:03 +00:00
|
|
|
|
2016-06-06 01:28:52 +01:00
|
|
|
buildGoPackage rec {
|
2016-07-18 23:14:40 +01:00
|
|
|
version = "3.1.0";
|
|
|
|
ts = "1468321182";
|
2015-11-16 13:28:03 +00:00
|
|
|
name = "grafana-v${version}";
|
|
|
|
goPackagePath = "github.com/grafana/grafana";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "grafana";
|
|
|
|
repo = "grafana";
|
2016-07-18 23:14:40 +01:00
|
|
|
sha256 = "1p3qp3p4wsb7m2lvdcrc1wz5mxqwqsj5xfqp28hkbfdqh3lblh42";
|
2015-11-16 13:28:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
srcStatic = fetchurl {
|
2016-07-18 23:14:40 +01:00
|
|
|
url = "https://grafanarel.s3.amazonaws.com/builds/grafana-${version}-${ts}.linux-x64.tar.gz";
|
|
|
|
sha256 = "174w0bx5cqriy77dyk9xsnmdskykzmgbyjczwb5kkp6j8vp7b0fs";
|
2015-11-16 13:28:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
preBuild = "export GOPATH=$GOPATH:$NIX_BUILD_TOP/go/src/${goPackagePath}/Godeps/_workspace";
|
|
|
|
postInstall = ''
|
|
|
|
tar -xvf $srcStatic
|
|
|
|
mkdir -p $bin/share/grafana
|
|
|
|
mv grafana-*/{public,conf} $bin/share/grafana/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = http://grafana.org/;
|
2016-05-13 01:28:24 +01:00
|
|
|
maintainers = with maintainers; [ offline fpletz ];
|
2015-11-18 10:33:50 +00:00
|
|
|
platforms = platforms.linux;
|
2015-11-16 13:28:03 +00:00
|
|
|
};
|
|
|
|
}
|