2018-03-27 18:17:10 +00:00
|
|
|
{ stdenv, fetchurl, elk6Version, makeWrapper, jre_headless, utillinux }:
|
2017-12-18 19:53:54 +00: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-17 22:18:12 +00:00
|
|
|
sha256 = "13hf00khq33yw6zv022vcrsf6vm43isx40x7ww8r1lqx3vmg3rli";
|
2017-12-18 19:53:54 +00: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 18:17:10 +00:00
|
|
|
buildInputs = [ makeWrapper jre_headless utillinux ];
|
2017-12-18 19:53:54 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R bin config lib modules plugins $out
|
|
|
|
|
|
|
|
chmod -x $out/bin/*.*
|
|
|
|
|
|
|
|
wrapProgram $out/bin/elasticsearch \
|
2018-03-27 18:17:10 +00:00
|
|
|
--prefix PATH : "${utillinux}/bin/" \
|
2018-04-07 23:43:47 +00:00
|
|
|
--set JAVA_HOME "${jre_headless}"
|
2017-12-18 19:53:54 +00: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 ];
|
|
|
|
};
|
|
|
|
}
|