2015-09-18 19:46:51 +01:00
|
|
|
{ stdenv, makeWrapper, fetchurl, nodejs, coreutils, which }:
|
2014-09-15 10:33:07 +01:00
|
|
|
|
|
|
|
with stdenv.lib;
|
2016-09-25 20:40:15 +01:00
|
|
|
let
|
|
|
|
inherit (builtins) elemAt;
|
2016-10-01 20:45:22 +01:00
|
|
|
archOverrides = {
|
|
|
|
"i686" = "x86";
|
|
|
|
};
|
2016-09-25 20:40:15 +01:00
|
|
|
info = splitString "-" stdenv.system;
|
2016-10-01 20:45:22 +01:00
|
|
|
arch = (elemAt info 0);
|
|
|
|
elasticArch = archOverrides."${arch}" or arch;
|
2016-09-25 20:40:15 +01:00
|
|
|
plat = elemAt info 1;
|
|
|
|
shas = {
|
2017-08-14 14:03:12 +01:00
|
|
|
"x86_64-linux" = "1wnnrhhpgc58s09p99cmi8r2jmwsd5lmh2inb0k8nmizz5v1sjz0";
|
|
|
|
"i686-linux" = "0sdx59jlfrf7r9793xpn2vxaxjdczgn3qfw8yny03dcs6fjaxi2y";
|
|
|
|
"x86_64-darwin" = "0rmp536kn001g52lxngpj6x6d0j3qj0r11d4djbz7h6s5ml03kza";
|
2016-09-25 20:40:15 +01:00
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
2014-09-15 10:33:07 +01:00
|
|
|
name = "kibana-${version}";
|
2017-08-14 14:03:12 +01:00
|
|
|
version = "4.6.5";
|
2014-09-15 10:33:07 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-10-01 20:45:22 +01:00
|
|
|
url = "https://download.elastic.co/kibana/kibana/${name}-${plat}-${elasticArch}.tar.gz";
|
2017-03-09 01:37:14 +00:00
|
|
|
sha256 = shas."${stdenv.system}" or (throw "Unknown architecture");
|
2014-09-15 10:33:07 +01:00
|
|
|
};
|
|
|
|
|
2015-09-18 19:46:51 +01:00
|
|
|
buildInputs = [ makeWrapper ];
|
2014-10-14 18:05:23 +01:00
|
|
|
|
2014-09-15 10:33:07 +01:00
|
|
|
installPhase = ''
|
2015-09-18 19:46:51 +01:00
|
|
|
mkdir -p $out/libexec/kibana $out/bin
|
|
|
|
mv * $out/libexec/kibana/
|
|
|
|
rm -r $out/libexec/kibana/node
|
|
|
|
makeWrapper $out/libexec/kibana/bin/kibana $out/bin/kibana \
|
2016-08-22 23:06:51 +01:00
|
|
|
--prefix PATH : "${stdenv.lib.makeBinPath [ nodejs coreutils which ]}"
|
2016-02-13 14:01:45 +00:00
|
|
|
sed -i 's@NODE=.*@NODE=${nodejs}/bin/node@' $out/libexec/kibana/bin/kibana
|
2014-09-15 10:33:07 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Visualize logs and time-stamped data";
|
|
|
|
homepage = http://www.elasticsearch.org/overview/kibana;
|
|
|
|
license = licenses.asl20;
|
2014-10-14 18:05:23 +01:00
|
|
|
maintainers = with maintainers; [ offline rickynils ];
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = with platforms; unix;
|
2014-09-15 10:33:07 +01:00
|
|
|
};
|
|
|
|
}
|