2018-03-27 20:17:10 +02:00
|
|
|
{ stdenv, fetchurl, elk6Version, makeWrapper, jre_headless, utillinux }:
|
2017-12-18 20:53:54 +01:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = elk6Version;
|
|
|
|
name = "elasticsearch-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://artifacts.elastic.co/downloads/elasticsearch/${name}.tar.gz";
|
2018-04-18 00:18:12 +02:00
|
|
|
sha256 = "13hf00khq33yw6zv022vcrsf6vm43isx40x7ww8r1lqx3vmg3rli";
|
2017-12-18 20:53:54 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./es-home-6.x.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s|ES_CLASSPATH=\"\$ES_HOME/lib/\*\"|ES_CLASSPATH=\"$out/lib/*\"|" ./bin/elasticsearch-env
|
|
|
|
'';
|
|
|
|
|
2018-03-27 20:17:10 +02:00
|
|
|
buildInputs = [ makeWrapper jre_headless utillinux ];
|
2017-12-18 20:53:54 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R bin config lib modules plugins $out
|
|
|
|
|
|
|
|
chmod -x $out/bin/*.*
|
|
|
|
|
|
|
|
wrapProgram $out/bin/elasticsearch \
|
2018-03-27 20:17:10 +02:00
|
|
|
--prefix PATH : "${utillinux}/bin/" \
|
2018-04-08 01:43:47 +02:00
|
|
|
--set JAVA_HOME "${jre_headless}"
|
2017-12-18 20:53:54 +01:00
|
|
|
|
|
|
|
wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre_headless}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Open Source, Distributed, RESTful Search Engine";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ apeschar basvandijk ];
|
|
|
|
};
|
|
|
|
}
|