2019-11-10 08:09:11 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, elasticsearch }:
|
2014-07-05 11:09:53 +01:00
|
|
|
|
|
|
|
let
|
2019-05-06 11:57:48 +01:00
|
|
|
esVersion = elasticsearch.version;
|
|
|
|
|
2014-07-05 11:09:53 +01:00
|
|
|
esPlugin = a@{
|
2014-10-16 19:29:10 +01:00
|
|
|
pluginName,
|
2014-07-05 11:09:53 +01:00
|
|
|
installPhase ? ''
|
2018-08-03 09:44:19 +01:00
|
|
|
mkdir -p $out/config
|
|
|
|
mkdir -p $out/plugins
|
2019-05-06 11:57:48 +01:00
|
|
|
ln -s ${elasticsearch}/lib $out/lib
|
|
|
|
ES_HOME=$out ${elasticsearch}/bin/elasticsearch-plugin install --batch -v file://$src
|
|
|
|
rm $out/lib
|
2014-10-16 19:29:10 +01:00
|
|
|
'',
|
2014-07-05 11:09:53 +01:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation (a // {
|
|
|
|
inherit installPhase;
|
2019-11-10 08:26:56 +00:00
|
|
|
pname = "elasticsearch-${pluginName}";
|
2019-06-19 16:45:34 +01:00
|
|
|
dontUnpack = true;
|
2020-02-25 15:05:34 +00:00
|
|
|
# Work around the "unpacker appears to have produced no directories"
|
|
|
|
# case that happens when the archive doesn't have a subdirectory.
|
|
|
|
setSourceRoot = "sourceRoot=$(pwd)";
|
2014-07-05 11:09:53 +01:00
|
|
|
buildInputs = [ unzip ];
|
|
|
|
meta = a.meta // {
|
2019-05-06 11:57:48 +01:00
|
|
|
platforms = elasticsearch.meta.platforms;
|
2019-11-10 08:09:11 +00:00
|
|
|
maintainers = (a.meta.maintainers or []) ++ (with lib.maintainers; [ offline ]);
|
2014-07-05 11:09:53 +01:00
|
|
|
};
|
|
|
|
});
|
|
|
|
in {
|
|
|
|
|
2020-02-25 15:05:34 +00:00
|
|
|
analysis-icu = esPlugin rec {
|
|
|
|
name = "elasticsearch-analysis-icu-${version}";
|
|
|
|
pluginName = "analysis-icu";
|
|
|
|
version = esVersion;
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
|
|
|
|
sha256 =
|
|
|
|
if version == "7.5.1" then "0v6ynbk34g7pl9cwy8ga8bk1my18jb6pc3pqbjl8p93w38219vi6"
|
|
|
|
else if version == "6.8.3" then "0vbaqyj0lfy3ijl1c9h92b0nh605h5mjs57bk2zhycdvbw5sx2lv"
|
|
|
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
|
|
|
};
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/analysis-icu";
|
2020-02-25 15:05:34 +00:00
|
|
|
description = "The ICU Analysis plugin integrates the Lucene ICU module into elasticsearch";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-05-06 11:57:48 +01:00
|
|
|
analysis-lemmagen = esPlugin rec {
|
2019-11-10 08:26:56 +00:00
|
|
|
pluginName = "analysis-lemmagen";
|
2019-05-06 11:57:48 +01:00
|
|
|
version = esVersion;
|
2014-07-05 11:09:53 +01:00
|
|
|
src = fetchurl {
|
2020-01-06 13:43:25 +00:00
|
|
|
url = "https://github.com/vhyza/elasticsearch-${pluginName}/releases/download/v${version}/elasticsearch-${pluginName}-${version}-plugin.zip";
|
2019-05-06 11:57:48 +01:00
|
|
|
sha256 =
|
2020-01-06 13:43:25 +00:00
|
|
|
if version == "7.5.1" then "0js8b9a9ma797448m3sy92qxbwziix8gkcka7hf17dqrb9k29v61"
|
2019-11-10 08:09:11 +00:00
|
|
|
else if version == "6.8.3" then "12bshvp01pp2lgwd0cn9l58axg8gdimsh4g9wfllxi1bdpv4cy53"
|
2019-05-06 11:57:48 +01:00
|
|
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
2014-07-05 11:09:53 +01:00
|
|
|
};
|
2019-11-10 08:09:11 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/vhyza/elasticsearch-analysis-lemmagen";
|
2014-07-05 11:09:53 +01:00
|
|
|
description = "LemmaGen Analysis plugin provides jLemmaGen lemmatizer as Elasticsearch token filter";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
};
|
2014-09-13 01:22:26 +01:00
|
|
|
|
2019-09-04 21:19:29 +01:00
|
|
|
analysis-phonetic = esPlugin rec {
|
|
|
|
pluginName = "analysis-phonetic";
|
|
|
|
version = esVersion;
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
|
|
|
|
sha256 =
|
|
|
|
if version == "7.5.1" then "0znmbdf99bli4kvyb3vxr5x48yb6n64nl38gpa63iqsv3nlbi0hp"
|
|
|
|
else if version == "6.8.3" then "0ggdhf7w50bxsffmcznrjy14b578fps0f8arg3v54qvj94v9jc37"
|
|
|
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
|
|
|
};
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/analysis-phonetic";
|
|
|
|
description = "The Phonetic Analysis plugin integrates phonetic token filter analysis with elasticsearch";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-09-01 14:08:44 +01:00
|
|
|
discovery-ec2 = esPlugin rec {
|
2018-08-03 09:58:42 +01:00
|
|
|
pluginName = "discovery-ec2";
|
2019-05-06 11:57:48 +01:00
|
|
|
version = esVersion;
|
2019-11-10 08:09:11 +00:00
|
|
|
src = fetchurl {
|
2019-05-06 11:57:48 +01:00
|
|
|
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
|
|
|
|
sha256 =
|
2020-01-06 13:43:25 +00:00
|
|
|
if version == "7.5.1" then "09wl2bpng4xx384xns960rymnm64b5zn2cb1sp25n85pd0isp4p2"
|
2019-11-10 08:09:11 +00:00
|
|
|
else if version == "6.8.3" then "0pmffz761dqjpvmkl7i7xsyw1iyyspqpddxp89rjsznfc9pak5im"
|
2019-05-06 11:57:48 +01:00
|
|
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
2018-08-03 09:58:42 +01:00
|
|
|
};
|
2019-11-10 08:09:11 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/discovery-ec2";
|
2018-08-03 09:58:42 +01:00
|
|
|
description = "The EC2 discovery plugin uses the AWS API for unicast discovery.";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
};
|
2014-10-16 19:29:10 +01:00
|
|
|
|
2019-11-10 04:51:57 +00:00
|
|
|
ingest-attachment = esPlugin rec {
|
|
|
|
pluginName = "ingest-attachment";
|
|
|
|
version = esVersion;
|
2019-11-10 08:09:11 +00:00
|
|
|
src = fetchurl {
|
2019-11-10 04:51:57 +00:00
|
|
|
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
|
|
|
|
sha256 =
|
2020-01-06 13:43:25 +00:00
|
|
|
if version == "7.5.1" then "0hhwxkjlkw1yv5sp6pdn5k1y8bdv4mnmb6nby1z4367mig6rm8v9"
|
2019-11-10 08:09:11 +00:00
|
|
|
else if version == "6.8.3" then "0kfr4i2rcwinjn31xrc2piicasjanaqcgnbif9xc7lnak2nnzmll"
|
2019-11-10 04:51:57 +00:00
|
|
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
|
|
|
};
|
2019-11-10 08:09:11 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/ingest-attachment";
|
2019-11-10 04:51:57 +00:00
|
|
|
description = "Ingest processor that uses Apache Tika to extract contents";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-05-06 11:57:48 +01:00
|
|
|
repository-s3 = esPlugin rec {
|
|
|
|
pluginName = "repository-s3";
|
|
|
|
version = esVersion;
|
2019-11-10 08:09:11 +00:00
|
|
|
src = fetchurl {
|
2019-05-06 11:57:48 +01:00
|
|
|
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip";
|
|
|
|
sha256 =
|
2020-01-06 13:43:25 +00:00
|
|
|
if version == "7.5.1" then "1j1rgbha5lh0a02h55zqc5qn0mvvi16l2m5r8lmaswp97px056v9"
|
2019-11-10 08:09:11 +00:00
|
|
|
else if version == "6.8.3" then "1mm6hj2m1db68n81rzsvlw6nisflr5ikzk5zv9nmk0z641n5vh1x"
|
2019-05-06 11:57:48 +01:00
|
|
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
|
|
|
};
|
2019-11-10 08:09:11 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/repository-s3";
|
2019-05-06 11:57:48 +01:00
|
|
|
description = "The S3 repository plugin adds support for using AWS S3 as a repository for Snapshot/Restore.";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
repository-gcs = esPlugin rec {
|
|
|
|
pluginName = "repository-gcs";
|
|
|
|
version = esVersion;
|
2019-11-10 08:09:11 +00:00
|
|
|
src = fetchurl {
|
2019-05-06 11:57:48 +01:00
|
|
|
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip";
|
|
|
|
sha256 =
|
2020-01-06 13:43:25 +00:00
|
|
|
if version == "7.5.1" then "15g438zpxrcmsgddwmk3sccy92ha90cyq9c61kcw1q84wfi0a7jl"
|
2019-11-10 08:09:11 +00:00
|
|
|
else if version == "6.8.3" then "1s2klpvnhpkrk53p64zbga3b66czi7h1a13f58kfn2cn0zfavnbk"
|
2019-05-06 11:57:48 +01:00
|
|
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
|
|
|
};
|
2019-11-10 08:09:11 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/repository-gcs";
|
2019-05-06 11:57:48 +01:00
|
|
|
description = "The GCS repository plugin adds support for using Google Cloud Storage as a repository for Snapshot/Restore.";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
search-guard = let
|
|
|
|
majorVersion = lib.head (builtins.splitVersion esVersion);
|
|
|
|
in esPlugin rec {
|
2015-08-19 23:20:44 +01:00
|
|
|
pluginName = "search-guard";
|
2019-05-06 11:57:48 +01:00
|
|
|
version =
|
2019-11-10 08:30:12 +00:00
|
|
|
# https://docs.search-guard.com/latest/search-guard-versions
|
2020-01-06 13:43:25 +00:00
|
|
|
if esVersion == "7.5.1" then "${esVersion}-38.0.0"
|
2019-11-10 08:09:11 +00:00
|
|
|
else if esVersion == "6.8.3" then "${esVersion}-25.5"
|
2019-05-06 11:57:48 +01:00
|
|
|
else throw "unsupported version ${esVersion} for plugin ${pluginName}";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://maven/com/floragunn/${pluginName}-${majorVersion}/${version}/${pluginName}-${majorVersion}-${version}.zip";
|
|
|
|
sha256 =
|
2020-01-06 13:43:25 +00:00
|
|
|
if version == "7.5.1-38.0.0" then "1a1wp9wrmz6ji2rnpk0b9jqnp86w0w0z8sb48giyc1gzcy1ra9yh"
|
2019-11-10 08:09:11 +00:00
|
|
|
else if version == "6.8.3-25.5" then "0a7ys9qinc0fjyka03cx9rv0pm7wnvslk234zv5vrphkrj52s1cb"
|
2019-05-06 11:57:48 +01:00
|
|
|
else throw "unsupported version ${version} for plugin ${pluginName}";
|
2015-08-19 23:20:44 +01:00
|
|
|
};
|
2019-11-10 08:09:11 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://search-guard.com";
|
2019-05-06 11:57:48 +01:00
|
|
|
description = "Elasticsearch plugin that offers encryption, authentication, and authorisation. ";
|
2015-08-19 23:20:44 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
};
|
2014-07-05 11:09:53 +01:00
|
|
|
}
|