summary refs log tree commit diff
path: root/pkgs/servers/search/elasticsearch
diff options
context:
space:
mode:
authorAndrew Childs <lorne@cons.org.nz>2018-06-28 19:09:39 +0900
committerAndrew Childs <lorne@cons.org.nz>2018-06-28 19:09:39 +0900
commita93c1c2acec2c1794bfaf0ba072c40a539df3264 (patch)
tree041282c44d45ec207bfefeccc271d190f2aa6516 /pkgs/servers/search/elasticsearch
parent7261a66d713aabf30249535bfa53e5d205c4423e (diff)
downloadnixpkgs-a93c1c2acec2c1794bfaf0ba072c40a539df3264.tar
nixpkgs-a93c1c2acec2c1794bfaf0ba072c40a539df3264.tar.gz
nixpkgs-a93c1c2acec2c1794bfaf0ba072c40a539df3264.tar.bz2
nixpkgs-a93c1c2acec2c1794bfaf0ba072c40a539df3264.tar.lz
nixpkgs-a93c1c2acec2c1794bfaf0ba072c40a539df3264.tar.xz
nixpkgs-a93c1c2acec2c1794bfaf0ba072c40a539df3264.tar.zst
nixpkgs-a93c1c2acec2c1794bfaf0ba072c40a539df3264.zip
elasticsearch5: Set classpath for elasticsearch-plugin
Diffstat (limited to 'pkgs/servers/search/elasticsearch')
-rw-r--r--pkgs/servers/search/elasticsearch/5.x.nix4
-rw-r--r--pkgs/servers/search/elasticsearch/es-classpath-5.x.patch9
2 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/servers/search/elasticsearch/5.x.nix b/pkgs/servers/search/elasticsearch/5.x.nix
index c80bbbcfde9..07ebf97ab2b 100644
--- a/pkgs/servers/search/elasticsearch/5.x.nix
+++ b/pkgs/servers/search/elasticsearch/5.x.nix
@@ -27,7 +27,9 @@ stdenv.mkDerivation rec {
       --set JAVA_HOME "${jre_headless}" \
       --set ES_JVM_OPTIONS "$out/config/jvm.options"
 
-    wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre_headless}"
+    wrapProgram $out/bin/elasticsearch-plugin \
+      --prefix ES_CLASSPATH : "$out/lib/*" \
+      --set JAVA_HOME "${jre_headless}"
   '';
 
   meta = {
diff --git a/pkgs/servers/search/elasticsearch/es-classpath-5.x.patch b/pkgs/servers/search/elasticsearch/es-classpath-5.x.patch
index 6898ffcf1d7..ccdca1e53af 100644
--- a/pkgs/servers/search/elasticsearch/es-classpath-5.x.patch
+++ b/pkgs/servers/search/elasticsearch/es-classpath-5.x.patch
@@ -32,3 +32,12 @@ diff -rupN a/bin/elasticsearch.in.sh b/bin/elasticsearch.in.sh
 -fi
 -
 -ES_CLASSPATH="$ES_HOME/lib/*"
+diff -rupN a/bin/elasticsearch-plugin b/bin/elasticsearch-plugin
+--- a/bin/elasticsearch-plugin	2018-04-13 01:21:55.000000000 +0900
++++ b/bin/elasticsearch-plugin	2018-06-28 19:08:54.700969245 +0900
+@@ -88,4 +88,4 @@ if [ -e "$CONF_DIR" ]; then
+   path_props=("${path_props[@]}" -Des.path.conf="$CONF_DIR")
+ fi
+ 
+-exec "$JAVA" $ES_JAVA_OPTS -Delasticsearch "${path_props[@]}" -cp "$ES_HOME/lib/*" org.elasticsearch.plugins.PluginCli "${args[@]}"
++exec "$JAVA" $ES_JAVA_OPTS -Delasticsearch "${path_props[@]}" -cp "$ES_CLASSPATH" org.elasticsearch.plugins.PluginCli "${args[@]}"