0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

hadoop: Consolidate sha256 attrs and add assert for supported platforms

This commit is contained in:
Connor Baker 2022-02-14 09:21:28 -05:00
parent e752dfc6fb
commit 1e5ffe1fc0

View file

@ -19,6 +19,8 @@
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, nativeLibs ? [ ], libPatches ? "" }:
let let
@ -81,9 +83,11 @@ in
pname = "hadoop"; pname = "hadoop";
version = "3.3.1"; version = "3.3.1";
untarDir = "${pname}-${version}"; untarDir = "${pname}-${version}";
sha256 = { sha256 = rec {
x86_64-linux = "1b3v16ihysqaxw8za1r5jlnphy8dwhivdx2d0z64309w57ihlxxd"; x86_64-linux = "1b3v16ihysqaxw8za1r5jlnphy8dwhivdx2d0z64309w57ihlxxd";
x86_64-darwin = x86_64-linux;
aarch64-linux = "00ln18vpi07jq2slk3kplyhcj8ad41n0yl880q5cihilk7daclxz"; aarch64-linux = "00ln18vpi07jq2slk3kplyhcj8ad41n0yl880q5cihilk7daclxz";
aarch64-darwin = aarch64-linux;
}; };
inherit openssl; inherit openssl;
nativeLibs = [ stdenv.cc.cc.lib protobuf3_7 zlib snappy ]; nativeLibs = [ stdenv.cc.cc.lib protobuf3_7 zlib snappy ];
@ -97,10 +101,6 @@ in
''; '';
jdk = jdk11_headless; jdk = jdk11_headless;
} // optionalAttrs stdenv.isDarwin { } // optionalAttrs stdenv.isDarwin {
sha256 = {
x86_64-darwin = "1b3v16ihysqaxw8za1r5jlnphy8dwhivdx2d0z64309w57ihlxxd";
aarch64-darwin = "00ln18vpi07jq2slk3kplyhcj8ad41n0yl880q5cihilk7daclxz";
};
openssl = null; openssl = null;
nativeLibs = [ ]; nativeLibs = [ ];
libPatches = ""; libPatches = "";