2018-03-27 19:17:10 +01:00
|
|
|
{ stdenv, fetchurl, elk5Version, makeWrapper, jre_headless, utillinux }:
|
2017-05-17 13:46:16 +01:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-06-13 21:36:08 +01:00
|
|
|
version = elk5Version;
|
2017-05-17 13:46:16 +01:00
|
|
|
name = "elasticsearch-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://artifacts.elastic.co/downloads/elasticsearch/${name}.tar.gz";
|
2018-04-17 23:13:16 +01:00
|
|
|
sha256 = "0sm99m4m4mmigj6ll22kyaw7zkp1s2i0mhzx15fzidnybdnlifb4";
|
2017-05-17 13:46:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./es-home-5.x.patch ./es-classpath-5.x.patch ];
|
|
|
|
|
2018-03-27 19:17:10 +01:00
|
|
|
buildInputs = [ makeWrapper jre_headless utillinux ];
|
2017-05-17 13:46:16 +01: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/*" \
|
2018-03-27 19:17:10 +01:00
|
|
|
--prefix PATH : "${utillinux}/bin" \
|
2017-09-28 03:16:32 +01:00
|
|
|
--set JAVA_HOME "${jre_headless}" \
|
2017-05-17 13:46:16 +01:00
|
|
|
--set ES_JVM_OPTIONS "$out/config/jvm.options"
|
|
|
|
|
2018-06-28 11:09:39 +01:00
|
|
|
wrapProgram $out/bin/elasticsearch-plugin \
|
|
|
|
--prefix ES_CLASSPATH : "$out/lib/*" \
|
|
|
|
--set JAVA_HOME "${jre_headless}"
|
2017-05-17 13:46:16 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Open Source, Distributed, RESTful Search Engine";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [
|
|
|
|
maintainers.apeschar
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|