3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/monitoring/grafana/default.nix

36 lines
1 KiB
Nix
Raw Normal View History

2015-11-16 13:28:03 +00:00
{ lib, goPackages, fetchurl, fetchFromGitHub }:
goPackages.buildGoPackage rec {
2016-01-08 16:17:56 +00:00
version = "2.6.0";
2015-11-16 13:28:03 +00:00
name = "grafana-v${version}";
goPackagePath = "github.com/grafana/grafana";
subPackages = [ "./" ];
src = fetchFromGitHub {
rev = "v${version}";
owner = "grafana";
repo = "grafana";
2016-01-08 16:17:56 +00:00
sha256 = "160jarvmfvrzpk8agbl44761qz4rw273d59jg6kzd0ghls03wipr";
2015-11-16 13:28:03 +00:00
};
srcStatic = fetchurl {
url = "https://grafanarel.s3.amazonaws.com/builds/grafana-${version}.linux-x64.tar.gz";
2016-01-08 16:17:56 +00:00
sha256 = "1i4aw5jvamgqfaanxlh3l83sn8xx10wpihciihvf7s3846s623ab";
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/;
maintainers = with maintainers; [ offline ];
platforms = platforms.linux;
2015-11-16 13:28:03 +00:00
};
}