2019-05-12 16:26:43 +02:00
|
|
|
{ stdenv, fetchurl, elk5Version, makeWrapper, jre_headless
|
|
|
|
, utillinux, gnugrep, coreutils }:
|
2017-05-17 14:46:16 +02:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-06-13 22:36:08 +02:00
|
|
|
version = elk5Version;
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "elasticsearch";
|
2017-05-17 14:46:16 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://artifacts.elastic.co/downloads/elasticsearch/${pname}-${version}.tar.gz";
|
2019-05-10 22:46:12 +02:00
|
|
|
sha256 = "0zy7awb2cm2fk3c7zc7v8b8pl0jw49awqwpa1jvilmvx6dcml0vb";
|
2017-05-17 14:46:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./es-home-5.x.patch ./es-classpath-5.x.patch ];
|
|
|
|
|
2018-03-27 20:17:10 +02:00
|
|
|
buildInputs = [ makeWrapper jre_headless utillinux ];
|
2017-05-17 14:46:16 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R bin config lib modules plugins $out
|
|
|
|
|
|
|
|
chmod -x $out/bin/*.*
|
|
|
|
|
|
|
|
wrapProgram $out/bin/elasticsearch \
|
|
|
|
--prefix ES_CLASSPATH : "$out/lib/*" \
|
2019-05-12 16:26:43 +02:00
|
|
|
--prefix PATH : "${makeBinPath [ utillinux gnugrep coreutils ]}" \
|
2017-09-28 04:16:32 +02:00
|
|
|
--set JAVA_HOME "${jre_headless}" \
|
2017-05-17 14:46:16 +02:00
|
|
|
--set ES_JVM_OPTIONS "$out/config/jvm.options"
|
|
|
|
|
2018-06-28 12:09:39 +02:00
|
|
|
wrapProgram $out/bin/elasticsearch-plugin \
|
|
|
|
--prefix ES_CLASSPATH : "$out/lib/*" \
|
|
|
|
--set JAVA_HOME "${jre_headless}"
|
2017-05-17 14:46:16 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Open Source, Distributed, RESTful Search Engine";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [
|
|
|
|
maintainers.apeschar
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|