about summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorBas van Dijk <v.dijk.bas@gmail.com>2019-04-15 07:05:13 +0200
committerGitHub <noreply@github.com>2019-04-15 07:05:13 +0200
commite5724e8e664ebf731f86220fe6722e9678489f3a (patch)
tree88ee31a590772ccc60c21ab3356c652b3443229e /pkgs/development/tools
parente367f9459dcc36e362ff4ddd11c70f6b76be5200 (diff)
parent13352f28d2b587a01c262cbee29678209c919e95 (diff)
downloadnixlib-e5724e8e664ebf731f86220fe6722e9678489f3a.tar
nixlib-e5724e8e664ebf731f86220fe6722e9678489f3a.tar.gz
nixlib-e5724e8e664ebf731f86220fe6722e9678489f3a.tar.bz2
nixlib-e5724e8e664ebf731f86220fe6722e9678489f3a.tar.lz
nixlib-e5724e8e664ebf731f86220fe6722e9678489f3a.tar.xz
nixlib-e5724e8e664ebf731f86220fe6722e9678489f3a.tar.zst
nixlib-e5724e8e664ebf731f86220fe6722e9678489f3a.zip
Merge pull request #59514 from basvandijk/elk-7.0.0
elk7: init at 7.0.0
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/misc/kibana/6.x.nix (renamed from pkgs/development/tools/misc/kibana/default.nix)0
-rw-r--r--pkgs/development/tools/misc/kibana/7.x.nix64
2 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/kibana/default.nix b/pkgs/development/tools/misc/kibana/6.x.nix
index b7e9dd0aaef4..b7e9dd0aaef4 100644
--- a/pkgs/development/tools/misc/kibana/default.nix
+++ b/pkgs/development/tools/misc/kibana/6.x.nix
diff --git a/pkgs/development/tools/misc/kibana/7.x.nix b/pkgs/development/tools/misc/kibana/7.x.nix
new file mode 100644
index 000000000000..19590239caf8
--- /dev/null
+++ b/pkgs/development/tools/misc/kibana/7.x.nix
@@ -0,0 +1,64 @@
+{ elk7Version
+, enableUnfree ? true
+, stdenv
+, makeWrapper
+, fetchzip
+, fetchurl
+, nodejs-10_x
+, coreutils
+, which
+}:
+
+with stdenv.lib;
+let
+  nodejs = nodejs-10_x;
+  inherit (builtins) elemAt;
+  info = splitString "-" stdenv.hostPlatform.system;
+  arch = elemAt info 0;
+  plat = elemAt info 1;
+  shas =
+    if enableUnfree
+    then {
+      "x86_64-linux"  = "0awkbnbrffv2m6n9zqv8k4m23g4mril69rmj84ndqpdnv7shrk4l";
+      "x86_64-darwin" = "0mbaya0xq99vfl8bn1wgi4m43c8qjp910bxf26z436km64311pip";
+    }
+    else {
+      "x86_64-linux"  = "0fy8vh0x2p8n2r3n5f67h1r5z75qfx5q4fghgqwnqymray5798v4";
+      "x86_64-darwin" = "0zyhvbwvdj95v2nswx5b83n4cw3zy5a6bkrvypw6k1i833c6v5g7";
+    };
+
+in stdenv.mkDerivation rec {
+  name = "kibana-${optionalString (!enableUnfree) "oss-"}${version}";
+  version = elk7Version;
+
+  src = fetchurl {
+    url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${arch}.tar.gz";
+    sha256 = shas."${stdenv.hostPlatform.system}" or (throw "Unknown architecture");
+  };
+
+  patches = [
+    # Kibana specifies it specifically needs nodejs 10.15.2 but nodejs in nixpkgs is at 10.15.3.
+    # The <nixpkgs/nixos/tests/elk.nix> test succeeds with this newer version so lets just
+    # disable the version check.
+    ./disable-nodejs-version-check.patch
+  ];
+
+  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 = if enableUnfree then licenses.elastic else licenses.asl20;
+    maintainers = with maintainers; [ offline rickynils basvandijk ];
+    platforms = with platforms; unix;
+  };
+}