summary refs log tree commit diff
path: root/pkgs/development/tools/misc/grafana/default.nix
blob: b1566684cf0b2ec86874ef833e3bc0bffa25b9d5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ stdenv, fetchurl, unzip, conf ? null }:

with stdenv.lib;

stdenv.mkDerivation rec {
  name = "grafana-${version}";
  version = "1.5.4";

  src = fetchurl {
    url = "http://grafanarel.s3.amazonaws.com/${name}.zip";
    sha256 = "fee7334efba967142955be2fa39ecae7bca0cc9b7a76c301430746be4fc7ec6d";
  };

  buildInputs = [ unzip ];

  phases = ["unpackPhase" "installPhase"];
  installPhase = ''
    mkdir -p $out && cp -R * $out
    ${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 ];
  };
}