mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
af47db6a3a
Security fix for CVE-2018-3818. https://www.elastic.co/guide/en/kibana/5.6/release-notes-5.6.6.html https://www.elastic.co/guide/en/logstash/5.6/logstash-5-6-6.html
45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ stdenv, fetchurl, elk5Version, makeWrapper, jre_headless, utillinux, getopt }:
|
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = elk5Version;
|
|
name = "elasticsearch-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "https://artifacts.elastic.co/downloads/elasticsearch/${name}.tar.gz";
|
|
sha256 = "0wjjvzjbdgdv9qznk1b8dx63zgs7s6jnrrbrnd5dn27lhymxiwpl";
|
|
};
|
|
|
|
patches = [ ./es-home-5.x.patch ./es-classpath-5.x.patch ];
|
|
|
|
buildInputs = [ makeWrapper jre_headless ] ++
|
|
(if (!stdenv.isDarwin) then [utillinux] else [getopt]);
|
|
|
|
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/*" \
|
|
${if (!stdenv.isDarwin)
|
|
then ''--prefix PATH : "${utillinux}/bin/"''
|
|
else ''--prefix PATH : "${getopt}/bin"''} \
|
|
--set JAVA_HOME "${jre_headless}" \
|
|
--set ES_JVM_OPTIONS "$out/config/jvm.options"
|
|
|
|
wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre_headless}"
|
|
'';
|
|
|
|
meta = {
|
|
description = "Open Source, Distributed, RESTful Search Engine";
|
|
license = licenses.asl20;
|
|
platforms = platforms.unix;
|
|
maintainers = [
|
|
maintainers.apeschar
|
|
];
|
|
};
|
|
}
|