about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/hadoop
diff options
context:
space:
mode:
authorConnor Baker <connorbaker01@gmail.com>2022-02-23 22:53:31 -0500
committerConnor Baker <connorbaker01@gmail.com>2022-02-23 22:53:31 -0500
commit799d7434e2a49407b6506cecb21d3f1fd3d3ae4c (patch)
tree73703fc9abe9b8db605e2d85d2f1ac470e8aae3b /pkgs/applications/networking/cluster/hadoop
parente10eed89e7fa0922a701810591c083860bf865b7 (diff)
hadoop: link native libraries on Darwin even though they're not used to simplify expression
Diffstat (limited to 'pkgs/applications/networking/cluster/hadoop')
-rw-r--r--pkgs/applications/networking/cluster/hadoop/default.nix12
1 files changed, 3 insertions, 9 deletions
diff --git a/pkgs/applications/networking/cluster/hadoop/default.nix b/pkgs/applications/networking/cluster/hadoop/default.nix
index 1a0a6dafec469..901987d087696 100644
--- a/pkgs/applications/networking/cluster/hadoop/default.nix
+++ b/pkgs/applications/networking/cluster/hadoop/default.nix
@@ -22,7 +22,7 @@ with lib;
 assert elem stdenv.system [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
 
 let
-  common = { pname, version, untarDir ? "${pname}-${version}", sha256, jdk, openssl, nativeLibs ? [ ], libPatches ? "" }:
+  common = { pname, version, untarDir ? "${pname}-${version}", sha256, jdk, openssl ? null, nativeLibs ? [ ], libPatches ? "" }:
     let
       platformUrlSuffix = optionalString stdenv.isAarch64 "-aarch64";
     in
@@ -89,6 +89,7 @@ in
           aarch64-linux = "00ln18vpi07jq2slk3kplyhcj8ad41n0yl880q5cihilk7daclxz";
           aarch64-darwin = aarch64-linux;
         };
+
         inherit openssl;
         nativeLibs = [ stdenv.cc.cc.lib protobuf3_7 zlib snappy ];
         libPatches = ''
@@ -97,13 +98,8 @@ in
           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/
-          patchelf --add-rpath ${jdk.home}/lib/server $out/lib/${untarDir}/lib/native/libnativetask.so.1.0.0
-        '';
+        '' + optionalString stdenv.isLinux "patchelf --add-rpath ${jdk.home}/lib/server $out/lib/${untarDir}/lib/native/libnativetask.so.1.0.0";
         jdk = jdk11_headless;
-      } // optionalAttrs stdenv.isDarwin {
-        openssl = null;
-        nativeLibs = [ ];
-        libPatches = "";
       });
   hadoop_3_2 = common rec {
     pname = "hadoop";
@@ -114,7 +110,6 @@ in
     jdk = jdk8_headless;
     # not using native libs because of broken openssl_1_0_2 dependency
     # can be manually overriden
-    openssl = null;
   };
   hadoop2 = common rec {
     pname = "hadoop";
@@ -123,6 +118,5 @@ in
       x86_64-linux = "1w31x4bk9f2swnx8qxx0cgwfg8vbpm6cy5lvfnbbpl3rsjhmyg97";
     };
     jdk = jdk8_headless;
-    openssl = null;
   };
 }