forked from mirrors/nixpkgs
Merge pull request #158613 from ConnorBaker/master
hadoop: add aarch64 support
This commit is contained in:
commit
43a765422f
|
@ -189,9 +189,9 @@ in
|
||||||
grocy = handleTest ./grocy.nix {};
|
grocy = handleTest ./grocy.nix {};
|
||||||
grub = handleTest ./grub.nix {};
|
grub = handleTest ./grub.nix {};
|
||||||
gvisor = handleTest ./gvisor.nix {};
|
gvisor = handleTest ./gvisor.nix {};
|
||||||
hadoop.all = handleTestOn [ "x86_64-linux" ] ./hadoop/hadoop.nix {};
|
hadoop.all = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hadoop/hadoop.nix {};
|
||||||
hadoop.hdfs = handleTestOn [ "x86_64-linux" ] ./hadoop/hdfs.nix {};
|
hadoop.hdfs = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hadoop/hdfs.nix {};
|
||||||
hadoop.yarn = handleTestOn [ "x86_64-linux" ] ./hadoop/yarn.nix {};
|
hadoop.yarn = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hadoop/yarn.nix {};
|
||||||
haka = handleTest ./haka.nix {};
|
haka = handleTest ./haka.nix {};
|
||||||
haproxy = handleTest ./haproxy.nix {};
|
haproxy = handleTest ./haproxy.nix {};
|
||||||
hardened = handleTest ./hardened.nix {};
|
hardened = handleTest ./hardened.nix {};
|
||||||
|
|
|
@ -1,23 +1,38 @@
|
||||||
{ lib, stdenv, fetchurl, makeWrapper, autoPatchelfHook
|
{ lib
|
||||||
, jdk8_headless, jdk11_headless
|
, stdenv
|
||||||
, bash, coreutils, which
|
, fetchurl
|
||||||
, bzip2, cyrus_sasl , protobuf3_7, snappy, zlib, zstd
|
, makeWrapper
|
||||||
|
, autoPatchelfHook
|
||||||
|
, jdk8_headless
|
||||||
|
, jdk11_headless
|
||||||
|
, bash
|
||||||
|
, coreutils
|
||||||
|
, which
|
||||||
|
, bzip2
|
||||||
|
, cyrus_sasl
|
||||||
|
, protobuf3_7
|
||||||
|
, snappy
|
||||||
|
, zlib
|
||||||
|
, zstd
|
||||||
, openssl
|
, openssl
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
assert elem stdenv.system [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||||
|
|
||||||
let
|
let
|
||||||
common = { pname, version, untarDir ? "${pname}-${version}", sha256, jdk, openssl, nativeLibs ? [ ], libPatches ? "" }:
|
common = { pname, version, untarDir ? "${pname}-${version}", sha256, jdk, openssl ? null, nativeLibs ? [ ], libPatches ? "" }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
inherit pname version jdk libPatches untarDir openssl;
|
inherit pname version jdk libPatches untarDir openssl;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://apache/hadoop/common/hadoop-${version}/hadoop-${version}.tar.gz";
|
url = "mirror://apache/hadoop/common/hadoop-${version}/hadoop-${version}" + optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz";
|
||||||
inherit sha256;
|
sha256 = sha256.${stdenv.system};
|
||||||
};
|
};
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ]
|
nativeBuildInputs = [ makeWrapper ]
|
||||||
++ optional (nativeLibs != [] || libPatches != "") [ autoPatchelfHook ];
|
++ optional (stdenv.isLinux && (nativeLibs != [ ] || libPatches != "")) [ autoPatchelfHook ];
|
||||||
buildInputs = [ openssl ] ++ nativeLibs;
|
buildInputs = [ openssl ] ++ nativeLibs;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -51,46 +66,49 @@ let
|
||||||
computers, each of which may be prone to failures.
|
computers, each of which may be prone to failures.
|
||||||
'';
|
'';
|
||||||
maintainers = with maintainers; [ volth illustris ];
|
maintainers = with maintainers; [ volth illustris ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = attrNames sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Different version of hadoop support different java runtime versions
|
# Different version of hadoop support different java runtime versions
|
||||||
# https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+Java+Versions
|
# https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+Java+Versions
|
||||||
hadoop_3_3 = common rec {
|
hadoop_3_3 =
|
||||||
pname = "hadoop";
|
common
|
||||||
version = "3.3.1";
|
(rec {
|
||||||
sha256 = "1b3v16ihysqaxw8za1r5jlnphy8dwhivdx2d0z64309w57ihlxxd";
|
pname = "hadoop";
|
||||||
untarDir = "${pname}-${version}";
|
version = "3.3.1";
|
||||||
jdk = jdk11_headless;
|
untarDir = "${pname}-${version}";
|
||||||
inherit openssl;
|
sha256 = rec {
|
||||||
# TODO: Package and add Intel Storage Acceleration Library
|
x86_64-linux = "1b3v16ihysqaxw8za1r5jlnphy8dwhivdx2d0z64309w57ihlxxd";
|
||||||
nativeLibs = [ stdenv.cc.cc.lib protobuf3_7 zlib snappy ];
|
x86_64-darwin = x86_64-linux;
|
||||||
libPatches = ''
|
aarch64-linux = "00ln18vpi07jq2slk3kplyhcj8ad41n0yl880q5cihilk7daclxz";
|
||||||
ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/${untarDir}/lib/native/libsasl2.so.2
|
aarch64-darwin = aarch64-linux;
|
||||||
ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/${untarDir}/lib/native/
|
};
|
||||||
ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/${untarDir}/lib/native/
|
|
||||||
ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/${untarDir}/lib/native/
|
inherit openssl;
|
||||||
ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/${untarDir}/lib/native/
|
nativeLibs = [ stdenv.cc.cc.lib protobuf3_7 zlib snappy ];
|
||||||
patchelf --add-rpath ${jdk.home}/lib/server $out/lib/${untarDir}/lib/native/libnativetask.so.1.0.0
|
libPatches = ''
|
||||||
'';
|
ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/${untarDir}/lib/native/libsasl2.so.2
|
||||||
};
|
ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/${untarDir}/lib/native/
|
||||||
|
ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/${untarDir}/lib/native/
|
||||||
|
ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/${untarDir}/lib/native/
|
||||||
|
ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/${untarDir}/lib/native/
|
||||||
|
'' + optionalString stdenv.isLinux "patchelf --add-rpath ${jdk.home}/lib/server $out/lib/${untarDir}/lib/native/libnativetask.so.1.0.0";
|
||||||
|
jdk = jdk11_headless;
|
||||||
|
});
|
||||||
hadoop_3_2 = common rec {
|
hadoop_3_2 = common rec {
|
||||||
pname = "hadoop";
|
pname = "hadoop";
|
||||||
version = "3.2.2";
|
version = "3.2.2";
|
||||||
sha256 = "1hxq297cqvkfgz2yfdiwa3l28g44i2abv5921k2d6b4pqd33prwp";
|
sha256.x86_64-linux = "1hxq297cqvkfgz2yfdiwa3l28g44i2abv5921k2d6b4pqd33prwp";
|
||||||
jdk = jdk8_headless;
|
jdk = jdk8_headless;
|
||||||
# not using native libs because of broken openssl_1_0_2 dependency
|
# not using native libs because of broken openssl_1_0_2 dependency
|
||||||
# can be manually overriden
|
# can be manually overriden
|
||||||
openssl = null;
|
|
||||||
};
|
};
|
||||||
hadoop2 = common rec {
|
hadoop2 = common rec {
|
||||||
pname = "hadoop";
|
pname = "hadoop";
|
||||||
version = "2.10.1";
|
version = "2.10.1";
|
||||||
sha256 = "1w31x4bk9f2swnx8qxx0cgwfg8vbpm6cy5lvfnbbpl3rsjhmyg97";
|
sha256.x86_64-linux = "1w31x4bk9f2swnx8qxx0cgwfg8vbpm6cy5lvfnbbpl3rsjhmyg97";
|
||||||
jdk = jdk8_headless;
|
jdk = jdk8_headless;
|
||||||
openssl = null;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue