3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/search/elasticsearch/default.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper, jre, utillinux }:
2014-07-05 09:58:08 +01:00
with stdenv.lib;
2013-03-07 11:36:29 +00:00
stdenv.mkDerivation rec {
2015-09-15 00:52:44 +01:00
name = "elasticsearch-1.7.2";
2013-03-07 11:36:29 +00:00
src = fetchurl {
2015-08-19 23:18:32 +01:00
url = "https://download.elastic.co/elasticsearch/elasticsearch/${name}.tar.gz";
2015-09-15 00:52:44 +01:00
sha256 = "1lix4asvx1lbc227gzsrws3xqbcbqaal7v10w60kch0c4xg970bg";
2013-03-07 11:36:29 +00:00
};
patches = [ ./es-home.patch ];
buildInputs = [ makeWrapper jre utillinux ];
2013-08-27 16:58:46 +01:00
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" \
2013-08-27 16:58:46 +01:00
--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";
2015-08-19 23:18:32 +01:00
license = licenses.asl20;
2014-07-05 11:09:53 +01:00
platforms = platforms.unix;
2015-08-19 23:18:32 +01:00
maintainers = [ maintainers.offline ];
2013-03-07 11:36:29 +00:00
};
}