2018-03-27 19:17:10 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, utillinux }:
|
2015-12-04 00:12:25 +00:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-01-20 08:51:40 +00:00
|
|
|
version = "2.4.4";
|
2015-12-04 00:12:25 +00:00
|
|
|
name = "elasticsearch-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/${version}/${name}.tar.gz";
|
2017-01-20 08:51:40 +00:00
|
|
|
sha256 = "1qjq04sfqb35pf2xpvr8j5p27chfxpjp8ymrp1h5bfk5rbk9444q";
|
2015-12-04 00:12:25 +00:00
|
|
|
};
|
|
|
|
|
2017-02-09 00:24:00 +00:00
|
|
|
patches = [ ./es-home-2.x.patch ./es-classpath-2.x.patch ];
|
2015-12-04 00:12:25 +00:00
|
|
|
|
2018-03-27 19:17:10 +01:00
|
|
|
buildInputs = [ makeWrapper jre utillinux ];
|
2015-12-04 00:12:25 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
2016-04-29 11:01:13 +01:00
|
|
|
cp -R bin config lib modules $out
|
2015-12-04 00:12:25 +00:00
|
|
|
|
|
|
|
# don't want to have binary with name plugin
|
|
|
|
mv $out/bin/plugin $out/bin/elasticsearch-plugin
|
2017-02-09 00:24:00 +00:00
|
|
|
wrapProgram $out/bin/elasticsearch \
|
|
|
|
--prefix ES_CLASSPATH : "$out/lib/${name}.jar":"$out/lib/*" \
|
2018-03-27 19:17:10 +01:00
|
|
|
--prefix PATH : "${utillinux}/bin" \
|
2015-12-04 00:12:25 +00:00
|
|
|
--set JAVA_HOME "${jre}"
|
|
|
|
wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Open Source, Distributed, RESTful Search Engine";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [
|
|
|
|
maintainers.offline
|
|
|
|
maintainers.markWot
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|