1 { lib, stdenv, fetchurl, unzip, elasticsearch }:
4 esVersion = elasticsearch.version;
12 ln -s ${elasticsearch}/lib ${elasticsearch}/modules $out
13 ES_HOME=$out ${elasticsearch}/bin/elasticsearch-plugin install --batch -v file://$src
14 rm $out/lib $out/modules
18 stdenv.mkDerivation (a // {
20 pname = "elasticsearch-${pluginName}";
22 # Work around the "unpacker appears to have produced no directories"
23 # case that happens when the archive doesn't have a subdirectory.
25 nativeBuildInputs = [ unzip ];
27 platforms = elasticsearch.meta.platforms;
28 maintainers = (a.meta.maintainers or [ ]) ++ (with lib.maintainers; [ offline ]);
34 analysis-icu = esPlugin rec {
35 name = "elasticsearch-analysis-icu-${version}";
36 pluginName = "analysis-icu";
39 url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
41 if version == "7.17.16" then "sha256-wgm6N5fofs5wTM25ZT3dJkg7iDesXsc3Up419IAY9gk="
42 else throw "unsupported version ${version} for plugin ${pluginName}";
45 homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/analysis-icu";
46 description = "The ICU Analysis plugin integrates the Lucene ICU module into elasticsearch";
47 license = licenses.asl20;
51 analysis-kuromoji = esPlugin rec {
52 pluginName = "analysis-kuromoji";
55 url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
57 if version == "7.17.16" then "sha256-SShdBcWfm21XoVhghSSiWIhsoXzG7wz6162iOmuf5EU="
58 else throw "unsupported version ${version} for plugin ${pluginName}";
61 homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/analysis-kuromoji";
62 description = "The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into Elasticsearch.";
63 license = licenses.asl20;
67 analysis-lemmagen = esPlugin rec {
68 pluginName = "analysis-lemmagen";
71 url = "https://github.com/vhyza/elasticsearch-${pluginName}/releases/download/v${version}/elasticsearch-${pluginName}-${version}-plugin.zip";
73 if version == "7.17.9" then "sha256-iY25apDkS6s0RoR9dVL2o/hFuUo6XhMzLjl8wDSFejk="
74 else throw "unsupported version ${version} for plugin ${pluginName}";
77 homepage = "https://github.com/vhyza/elasticsearch-analysis-lemmagen";
78 description = "LemmaGen Analysis plugin provides jLemmaGen lemmatizer as Elasticsearch token filter";
79 license = licenses.asl20;
80 broken = true; # Not released yet for ES 7.17.10
84 analysis-phonetic = esPlugin rec {
85 pluginName = "analysis-phonetic";
88 url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
90 if version == "7.17.16" then "sha256-S/Cp9opeLitFh2/3Qw7/MFt6GcYKufxXKD6cJSi3SaQ="
91 else throw "unsupported version ${version} for plugin ${pluginName}";
94 homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/analysis-phonetic";
95 description = "The Phonetic Analysis plugin integrates phonetic token filter analysis with elasticsearch";
96 license = licenses.asl20;
100 discovery-ec2 = esPlugin rec {
101 pluginName = "discovery-ec2";
104 url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
106 if version == "7.17.16" then "sha256-hMErTLd5fXg420Olz+j6Zv7WByA1aNq9FlEgCtkYIxY="
107 else throw "unsupported version ${version} for plugin ${pluginName}";
110 homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/discovery-ec2";
111 description = "The EC2 discovery plugin uses the AWS API for unicast discovery.";
112 license = licenses.asl20;
116 ingest-attachment = esPlugin rec {
117 pluginName = "ingest-attachment";
120 url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
122 if version == "7.17.16" then "sha256-z0gfdx98urCzdQNlVn99CmteG6jweOmUDmGJW89twtU="
123 else throw "unsupported version ${version} for plugin ${pluginName}";
126 homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/ingest-attachment";
127 description = "Ingest processor that uses Apache Tika to extract contents";
128 license = licenses.asl20;
132 repository-s3 = esPlugin rec {
133 pluginName = "repository-s3";
136 url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip";
138 if version == "7.17.16" then "sha256-TWMN8jzFjzBVTUB+zn4tJr47VMXHC8U+014BvnArK8M="
139 else throw "unsupported version ${version} for plugin ${pluginName}";
142 homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/repository-s3";
143 description = "The S3 repository plugin adds support for using AWS S3 as a repository for Snapshot/Restore.";
144 license = licenses.asl20;
148 repository-gcs = esPlugin rec {
149 pluginName = "repository-gcs";
152 url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip";
154 if version == "7.17.16" then "sha256-hG5wy1Xw4T1NzI7pja3CejwJg002/n6YqM1/QaVSWbg="
155 else throw "unsupported version ${version} for plugin ${pluginName}";
158 homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/repository-gcs";
159 description = "The GCS repository plugin adds support for using Google Cloud Storage as a repository for Snapshot/Restore.";
160 license = licenses.asl20;
165 majorVersion = lib.head (builtins.splitVersion esVersion);
167 pluginName = "search-guard";
169 # https://docs.search-guard.com/latest/search-guard-versions
170 if esVersion == "7.17.16" then "${esVersion}-53.8.0"
171 else throw "unsupported version ${esVersion} for plugin ${pluginName}";
173 if esVersion == "7.17.16" then
175 url = "https://maven.search-guard.com/search-guard-suite-release/com/floragunn/search-guard-suite-plugin/${version}/search-guard-suite-plugin-${version}.zip";
176 hash = "sha256-j8dz7rUKWqMvT6EksoFIuGJzYcgdMipKeg2d8UtzlDI=";
178 else throw "unsupported version ${version} for plugin ${pluginName}";
180 homepage = "https://search-guard.com";
181 description = "Elasticsearch plugin that offers encryption, authentication, and authorisation.";
182 license = licenses.asl20;