elasticsearch6*: remove

This commit is contained in:
ajs124 2022-10-04 15:26:29 +02:00
parent 82ebf4dfae
commit 09a6672bbf
5 changed files with 7 additions and 122 deletions

View File

@ -268,14 +268,6 @@ let
'';
}) { inherit pkgs system; };
in {
ELK-6 = mkElkTest "elk-6-oss" {
name = "elk-6-oss";
elasticsearch = pkgs.elasticsearch6-oss;
logstash = pkgs.logstash6-oss;
kibana = pkgs.kibana6-oss;
journalbeat = pkgs.journalbeat6;
metricbeat = pkgs.metricbeat6;
};
# We currently only package upstream binaries.
# Feel free to package an SSPL licensed source-based package!
# ELK-7 = mkElkTest "elk-7-oss" {
@ -287,13 +279,6 @@ in {
# metricbeat = pkgs.metricbeat7;
# };
unfree = lib.dontRecurseIntoAttrs {
ELK-6 = mkElkTest "elk-6" {
elasticsearch = pkgs.elasticsearch6;
logstash = pkgs.logstash6;
kibana = pkgs.kibana6;
journalbeat = pkgs.journalbeat6;
metricbeat = pkgs.metricbeat6;
};
ELK-7 = mkElkTest "elk-7" {
elasticsearch = pkgs.elasticsearch7;
logstash = pkgs.logstash7;

View File

@ -1,76 +0,0 @@
{ elk6Version
, enableUnfree ? true
, lib, stdenv
, fetchurl
, makeWrapper
, jre_headless
, util-linux, gnugrep, coreutils
, libxcrypt
, autoPatchelfHook
, zlib
}:
with lib;
stdenv.mkDerivation (rec {
version = elk6Version;
pname = "elasticsearch${optionalString (!enableUnfree) "-oss"}";
src = fetchurl {
url = "https://artifacts.elastic.co/downloads/elasticsearch/${pname}-${version}.tar.gz";
sha256 =
if enableUnfree
then "1hkcgqsrnnx3zjpgar4424mxfaxrx0zbrp7n7n0dlbhphshwnkmd"
else "1pglg60aigy31xmpfchnxcc04nd18zwc3av4m0kyp00yk5mnlyqm";
};
patches = [ ./es-home-6.x.patch ];
postPatch = ''
substituteInPlace bin/elasticsearch-env --replace \
"ES_CLASSPATH=\"\$ES_HOME/lib/*\"" \
"ES_CLASSPATH=\"$out/lib/*\""
substituteInPlace bin/elasticsearch-cli --replace \
"ES_CLASSPATH=\"\$ES_CLASSPATH:\$ES_HOME/\$additional_classpath_directory/*\"" \
"ES_CLASSPATH=\"\$ES_CLASSPATH:$out/\$additional_classpath_directory/*\""
'';
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre_headless util-linux ]
++ optionals enableUnfree [ zlib libxcrypt ];
installPhase = ''
mkdir -p $out
cp -R bin config lib modules plugins $out
chmod -x $out/bin/*.*
wrapProgram $out/bin/elasticsearch \
--prefix PATH : "${makeBinPath [ util-linux gnugrep coreutils ]}" \
--set JAVA_HOME "${jre_headless}"
wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre_headless}"
'';
passthru = { inherit enableUnfree; };
meta = {
description = "Open Source, Distributed, RESTful Search Engine";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = if enableUnfree then licenses.elastic else licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ apeschar basvandijk ];
};
} // optionalAttrs enableUnfree {
dontPatchELF = true;
nativeBuildInputs = [ makeWrapper ]
++ optional stdenv.isLinux autoPatchelfHook;
runtimeDependencies = [ zlib ];
postFixup = lib.optionalString stdenv.isLinux ''
for exe in $(find $out/modules/x-pack-ml/platform/linux-x86_64/bin -executable -type f); do
echo "patching $exe..."
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$exe"
done
'';
})

View File

@ -39,7 +39,6 @@ in
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
sha256 =
if version == "7.17.4" then "a4e881d86694ae70ab6b18f72ea700415971200145d33d438e57c0374d9fc16f"
else if version == "6.8.21" then "06b1pavyggzfp4wwdql0q9nm3r7i9px9cagp4yh4nhxhnk4w5fiq"
else throw "unsupported version ${version} for plugin ${pluginName}";
};
meta = with lib; {
@ -56,7 +55,6 @@ in
url = "https://github.com/vhyza/elasticsearch-${pluginName}/releases/download/v${version}/elasticsearch-${pluginName}-${version}-plugin.zip";
sha256 =
if version == "7.17.3" then "1835f374230cb17193859cee22ac90e3d7a67fb41a55fd4578e840d708287a08"
else if version == "6.8.21" then "0m80cn7vkcvk95v4pdmi6vk5ww7p01k0hj2iqb9g870vs6x2qjzv"
else throw "unsupported version ${version} for plugin ${pluginName}";
};
meta = with lib; {
@ -73,7 +71,6 @@ in
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
sha256 =
if version == "7.17.4" then "1c8175b2dac54277c1f41981fb4a784829e74e6e74268381fe0c27bc6652704b"
else if version == "6.8.21" then "07w8s4a5gvr9lzjzf629y8rx3kvs6zd1vl07ksw1paghp42yb354"
else throw "unsupported version ${version} for plugin ${pluginName}";
};
meta = with lib; {
@ -90,7 +87,6 @@ in
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
sha256 =
if version == "7.17.4" then "702e446997bde5cb38af120a1cb4271d976fdd23444be49e53b6be3801d845a9"
else if version == "6.8.21" then "1kdpbrasxwr3dn21zjrklp1s389rwa51fairygdwl8px9liwwfa5"
else throw "unsupported version ${version} for plugin ${pluginName}";
};
meta = with lib; {
@ -107,7 +103,6 @@ in
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
sha256 =
if version == "7.17.4" then "7d1574a585a9db0988ee248159d51f62cce5578a8c082096ef3e26efdb24aee7"
else if version == "6.8.21" then "0v31yyhjcdlqnjw1f9kihh7z3c6d31whc57hqqd1dn579n4s9rlz"
else throw "unsupported version ${version} for plugin ${pluginName}";
};
meta = with lib; {
@ -124,7 +119,6 @@ in
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip";
sha256 =
if version == "7.17.4" then "cad923a662db705d40ca29698aa118e9e4cc50ae564c426a76d5acb777a4f57c"
else if version == "6.8.21" then "0sfh1az30q4f34zxig2fz8wn9gk53fmmxyg5pbi1svn9761p5awq"
else throw "unsupported version ${version} for plugin ${pluginName}";
};
meta = with lib; {
@ -141,7 +135,6 @@ in
url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip";
sha256 =
if version == "7.17.4" then "a50be4cea5c68ad7615f87d672ba160d027fdfde2be0578bb2dabd6384cc8108"
else if version == "6.8.21" then "00lwj00rfdk6850gk1n86chiz2w6afpqn7jn588jdbwv41qh5mrv"
else throw "unsupported version ${version} for plugin ${pluginName}";
};
meta = with lib; {
@ -158,7 +151,6 @@ in
version =
# https://docs.search-guard.com/latest/search-guard-versions
if esVersion == "7.17.3" then "${esVersion}-53.1.0"
else if esVersion == "6.8.21" then "${esVersion}-25.6"
else throw "unsupported version ${esVersion} for plugin ${pluginName}";
src =
if esVersion == "7.17.3" then
@ -166,11 +158,6 @@ in
url = "https://maven.search-guard.com/search-guard-suite-release/com/floragunn/search-guard-suite-plugin/${version}/search-guard-suite-plugin-${version}.zip";
sha256 = "b49b24f7b74043cb5bab93f18316ea71656a7668e61bf063ccaa7b0ee2302a31";
}
else if esVersion == "6.8.21" then
fetchurl {
url = "https://maven.search-guard.com/search-guard-release/com/floragunn/search-guard-6/${version}/search-guard-6-${version}.zip";
sha256 = "19nj513wigwd0mzq747zax4fzvv5vi24f7j0636rydd9iv9cyhg2";
}
else throw "unsupported version ${version} for plugin ${pluginName}";
meta = with lib; {
homepage = "https://search-guard.com";

View File

@ -411,6 +411,11 @@ mapAliases ({
elasticmq = throw "elasticmq has been removed in favour of elasticmq-server-bin"; # Added 2021-01-17
elasticsearch7-oss = throw "elasticsearch7-oss has been removed, as the distribution is no longer provided by upstream. https://github.com/NixOS/nixpkgs/pull/114456"; # Added 2021-06-09
elasticsearch6 = throw "elasticsearch6 has been removed because it reached end of life"; # Added 2022-10-04
elasticsearch6-oss = throw "elasticsearch6-oss has been removed because it reached end of life"; # Added 2022-10-04
elasticsearch6Plugins = throw "elasticsearch6Plugins has been removed because it reached end of life"; # Added 2022-10-04
elasticsearch7Plugins = elasticsearchPlugins;
# Electron
electron_3 = throw "electron_3 has been removed in favor of newer versions"; # added 2022-01-06
electron_4 = throw "electron_4 has been removed in favor of newer versions"; # added 2022-01-06

View File

@ -7152,36 +7152,20 @@ with pkgs;
# The latest version used by elasticsearch, logstash, kibana and the the beats from elastic.
# When updating make sure to update all plugins or they will break!
elk6Version = "6.8.21";
elk7Version = "7.17.4";
elasticsearch6 = callPackage ../servers/search/elasticsearch/6.x.nix {
util-linux = util-linuxMinimal;
jre_headless = jre8_headless; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
};
elasticsearch6-oss = callPackage ../servers/search/elasticsearch/6.x.nix {
enableUnfree = false;
util-linux = util-linuxMinimal;
jre_headless = jre8_headless; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
};
elasticsearch7 = callPackage ../servers/search/elasticsearch/7.x.nix {
util-linux = util-linuxMinimal;
jre_headless = jdk11_headless; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
};
elasticsearch = elasticsearch6;
elasticsearch-oss = elasticsearch6-oss;
elasticsearch = elasticsearch7;
elasticsearch-oss = elasticsearch7-oss;
elasticsearchPlugins = recurseIntoAttrs (
callPackage ../servers/search/elasticsearch/plugins.nix {
elasticsearch = elasticsearch-oss;
}
);
elasticsearch6Plugins = elasticsearchPlugins.override {
elasticsearch = elasticsearch6-oss;
};
elasticsearch7Plugins = elasticsearchPlugins.override {
elasticsearch = elasticsearch7;
};
elasticsearch-curator = callPackage ../tools/admin/elasticsearch-curator { };