2014-05-26 18:47:06 +04:00
|
|
|
{ stdenv, fetchurl, unzip, conf ? null }:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "grafana-${version}";
|
2015-01-12 12:20:54 +03:00
|
|
|
version = "1.9.1";
|
2014-05-26 18:47:06 +04:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://grafanarel.s3.amazonaws.com/${name}.zip";
|
2015-01-12 12:20:54 +03:00
|
|
|
sha256 = "1zyzsbspxrzaf2kk6fysp6c3y025s6nd75rc2p9qq9q95dv8fj23";
|
2014-05-26 18:47:06 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ unzip ];
|
|
|
|
|
|
|
|
phases = ["unpackPhase" "installPhase"];
|
|
|
|
installPhase = ''
|
2014-06-30 16:56:10 +04:00
|
|
|
mkdir -p $out && cp -R * $out
|
2014-05-26 18:47:06 +04:00
|
|
|
${optionalString (conf!=null) ''cp ${conf} $out/config.js''}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A Graphite & InfluxDB Dashboard and Graph Editor";
|
|
|
|
homepage = http://grafana.org/;
|
|
|
|
license = licenses.asl20;
|
|
|
|
|
|
|
|
maintainers = [ maintainers.offline ];
|
|
|
|
};
|
|
|
|
}
|