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