Skip to content

Commit

Permalink
hadoop: Minor simplifications to default.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorBaker committed Feb 26, 2022
1 parent 799d743 commit 2cf9686
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions pkgs/applications/networking/cluster/hadoop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@ assert elem stdenv.system [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarc

let
common = { pname, version, untarDir ? "${pname}-${version}", sha256, jdk, openssl ? null, nativeLibs ? [ ], libPatches ? "" }:
let
platformUrlSuffix = optionalString stdenv.isAarch64 "-aarch64";
in
stdenv.mkDerivation rec {
inherit pname version jdk libPatches untarDir openssl;
src = fetchurl {
url = "mirror://apache/hadoop/common/hadoop-${version}/hadoop-${version}${platformUrlSuffix}.tar.gz";
url = "mirror://apache/hadoop/common/hadoop-${version}/hadoop-${version}" + optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz";
sha256 = sha256.${stdenv.system};
};
doCheck = true;
Expand Down Expand Up @@ -69,9 +66,8 @@ let
computers, each of which may be prone to failures.
'';
maintainers = with maintainers; [ volth illustris ];
platforms = builtins.attrNames sha256;
platforms = attrNames sha256;
};

};
in
{
Expand Down Expand Up @@ -104,19 +100,15 @@ in
hadoop_3_2 = common rec {
pname = "hadoop";
version = "3.2.2";
sha256 = {
x86_64-linux = "1hxq297cqvkfgz2yfdiwa3l28g44i2abv5921k2d6b4pqd33prwp";
};
sha256.x86_64-linux = "1hxq297cqvkfgz2yfdiwa3l28g44i2abv5921k2d6b4pqd33prwp";
jdk = jdk8_headless;
# not using native libs because of broken openssl_1_0_2 dependency
# can be manually overriden
};
hadoop2 = common rec {
pname = "hadoop";
version = "2.10.1";
sha256 = {
x86_64-linux = "1w31x4bk9f2swnx8qxx0cgwfg8vbpm6cy5lvfnbbpl3rsjhmyg97";
};
sha256.x86_64-linux = "1w31x4bk9f2swnx8qxx0cgwfg8vbpm6cy5lvfnbbpl3rsjhmyg97";
jdk = jdk8_headless;
};
}

0 comments on commit 2cf9686

Please sign in to comment.