···
assert elem stdenv.system [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
29
-
common = { pname, versions, untarDir ? "${pname}-${version}", hash, jdk, openssl ? null, nativeLibs ? [ ], libPatches ? "", tests }:
29
+
common = { pname, platformAttrs, untarDir ? "${pname}-${version}", jdk, openssl ? null, nativeLibs ? [ ], libPatches ? "", tests }:
stdenv.mkDerivation rec {
inherit pname jdk libPatches untarDir openssl;
32
-
version = versions.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
32
+
version = platformAttrs.${stdenv.system}.version or (throw "Unsupported system: ${stdenv.system}");
url = "mirror://apache/hadoop/common/hadoop-${version}/hadoop-${version}" + optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz";
35
-
hash = hash.${stdenv.system};
35
+
inherit (platformAttrs.${stdenv.system}) hash;
···
passthru = { inherit tests; };
66
+
meta = recursiveUpdate {
homepage = "https://hadoop.apache.org/";
description = "Framework for distributed processing of large data sets across clusters of computers";
license = licenses.asl20;
···
computers, each of which may be prone to failures.
maintainers = with maintainers; [ illustris ];
84
-
platforms = attrNames hash;
84
+
platforms = attrNames platformAttrs;
85
+
} (attrByPath [ stdenv.system "meta" ] {} platformAttrs);
···
# https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+Java+Versions
hadoop_3_3 = common rec {
94
-
x86_64-linux = "3.3.3";
95
-
x86_64-darwin = x86_64-linux;
96
-
aarch64-linux = "3.3.1";
97
-
aarch64-darwin = aarch64-linux;
93
+
platformAttrs = rec {
96
+
hash = "sha256-+nHGG7qkJxKa7wn+wCizTdVCxlrZD9zOxefvk9g7h2Q=";
98
+
x86_64-darwin = x86_64-linux;
101
+
hash = "sha256-v1Om2pk0wsgKBghRD2wgTSHJoKd3jkm1wPKAeDcKlgI=";
102
+
meta.knownVulnerabilities = [ "CVE-2021-37404" "CVE-2021-33036" ];
104
+
aarch64-darwin = aarch64-linux;
99
-
untarDir = "${pname}-${version}";
101
-
x86_64-linux = "sha256-+nHGG7qkJxKa7wn+wCizTdVCxlrZD9zOxefvk9g7h2Q=";
102
-
x86_64-darwin = x86_64-linux;
103
-
aarch64-linux = "sha256-v1Om2pk0wsgKBghRD2wgTSHJoKd3jkm1wPKAeDcKlgI=";
104
-
aarch64-darwin = aarch64-linux;
106
+
untarDir = "${pname}-${platformAttrs.${stdenv.system}.version}";
# TODO: Package and add Intel Storage Acceleration Library
···
hadoop_3_2 = common rec {
126
-
versions.x86_64-linux = "3.2.3";
127
-
hash.x86_64-linux = "sha256-Q2/a1LcKutpJoGySB0qlCcYE2bvC/HoG/dp9nBikuNU=";
127
+
platformAttrs.x86_64-linux = {
129
+
hash = "sha256-Q2/a1LcKutpJoGySB0qlCcYE2bvC/HoG/dp9nBikuNU=";
# not using native libs because of broken openssl_1_0_2 dependency
# can be manually overriden
···
135
-
versions.x86_64-linux = "2.10.2";
136
-
hash.x86_64-linux = "sha256-xhA4zxqIRGNhIeBnJO9dLKf/gx/Bq+uIyyZwsIafEyo=";
138
+
platformAttrs.x86_64-linux = {
139
+
version = "2.10.2";
140
+
hash = "sha256-xhA4zxqIRGNhIeBnJO9dLKf/gx/Bq+uIyyZwsIafEyo=";
tests = nixosTests.hadoop2;