2013-08-27 16:58:46 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, utillinux }:
|
2013-03-07 11:36:29 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2013-08-27 16:58:46 +01:00
|
|
|
name = "elasticsearch-0.90.3";
|
2013-03-07 11:36:29 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.elasticsearch.org/elasticsearch/elasticsearch/${name}.tar.gz";
|
2013-08-27 16:58:46 +01:00
|
|
|
sha256 = "1l6rnp4yvlz4z6z4v3af08yd4sl91c4zz20a8yyif2p234lh3n2s";
|
2013-03-07 11:36:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./es-home.patch ];
|
|
|
|
|
2013-08-27 16:58:46 +01:00
|
|
|
buildInputs = [ makeWrapper jre utillinux ];
|
|
|
|
|
2013-03-07 11:36:29 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R bin config lib $out
|
2013-08-27 16:58:46 +01:00
|
|
|
|
|
|
|
# don't want to have binary with name plugin
|
|
|
|
mv $out/bin/plugin $out/bin/elasticsearch-plugin
|
|
|
|
|
|
|
|
# set ES_CLASSPATH and JAVA_HOME
|
|
|
|
wrapProgram $out/bin/elasticsearch \
|
|
|
|
--prefix ES_CLASSPATH : "$out/lib/${name}.jar":"$out/lib/*":"$out/lib/sigar/*" \
|
|
|
|
--prefix PATH : "${utillinux}/bin/" \
|
|
|
|
--set JAVA_HOME "${jre}"
|
|
|
|
wrapProgram $out/bin/elasticsearch-plugin \
|
|
|
|
--prefix ES_CLASSPATH : "$out/lib/${name}.jar":"$out/lib/*":"$out/lib/sigar/*" --set JAVA_HOME "${jre}"
|
2013-03-07 11:36:29 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Open Source, Distributed, RESTful Search Engine";
|
|
|
|
license = "ASL2.0";
|
|
|
|
};
|
|
|
|
}
|