nixpkgs-suyu/pkgs/development/tools/misc/kibana/default.nix
Susan Potter 46ff1c385f kibana: 4.5.2 -> 4.6.0 (#18277)
Includes supporting binary src for x86_64-linux, x86_64-darwin, and
i686-linux which were previously unsupported and failed grossly before.
2016-09-25 21:40:15 +02:00

41 lines
1.3 KiB
Nix

{ stdenv, makeWrapper, fetchurl, nodejs, coreutils, which }:
with stdenv.lib;
let
inherit (builtins) elemAt;
info = splitString "-" stdenv.system;
arch = elemAt info 0;
plat = elemAt info 1;
shas = {
"x86_64-linux" = "1md3y3a8rxvf37lnfc56kbirv2rjl68pa5672yxhfmjngrr20rcw";
"i686-linux" = "0d77a2v14pg5vr711hzbva8jjy0sxw9w889f2r1vhwngrhcfz4pf";
"x86_64-darwin" = "1cajljx13h8bncmayzvlzsynwambz61cspjnsn2h19zghn2vj2c9";
};
in stdenv.mkDerivation rec {
name = "kibana-${version}";
version = "4.6.0";
src = fetchurl {
url = "https://download.elastic.co/kibana/kibana/${name}-${plat}-${arch}.tar.gz";
sha256 = shas."${stdenv.system}";
};
buildInputs = [ makeWrapper ];
installPhase = ''
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 \
--prefix PATH : "${stdenv.lib.makeBinPath [ nodejs coreutils which ]}"
sed -i 's@NODE=.*@NODE=${nodejs}/bin/node@' $out/libexec/kibana/bin/kibana
'';
meta = {
description = "Visualize logs and time-stamped data";
homepage = http://www.elasticsearch.org/overview/kibana;
license = licenses.asl20;
maintainers = with maintainers; [ offline rickynils ];
platforms = with platforms; unix;
};
}