diff options
author | Doron Behar <doron.behar@gmail.com> | 2021-09-26 16:32:17 +0300 |
---|---|---|
committer | Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> | 2021-10-02 19:57:31 +0800 |
commit | 499eb1b56a4ef24d7279920661e3ef865b0d0e37 (patch) | |
tree | 75a870ac036a3d3544791fccd08dacf8f521998e /pkgs/tools/misc/hdf4 | |
parent | 9e88aadbb4e215af141c4ea98a97c2d2a6a7cbd3 (diff) |
hdf4: consistently use *Support arguments
Diffstat (limited to 'pkgs/tools/misc/hdf4')
-rw-r--r-- | pkgs/tools/misc/hdf4/default.nix | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/pkgs/tools/misc/hdf4/default.nix b/pkgs/tools/misc/hdf4/default.nix index 99acda6b78830..98cd0cfbdee3a 100644 --- a/pkgs/tools/misc/hdf4/default.nix +++ b/pkgs/tools/misc/hdf4/default.nix @@ -7,7 +7,8 @@ , uselibtirpc ? stdenv.isLinux , libtirpc , zlib -, szip ? null +, szipSupport ? false +, szip , javaSupport ? false , jdk }: @@ -55,10 +56,10 @@ stdenv.mkDerivation rec { buildInputs = [ libjpeg - szip zlib ] ++ lib.optional javaSupport jdk + ++ lib.optional szipSupport szip ++ lib.optional uselibtirpc libtirpc; preConfigure = lib.optionalString uselibtirpc '' @@ -66,7 +67,7 @@ stdenv.mkDerivation rec { substituteInPlace config/cmake/FindXDR.cmake \ --replace 'find_path(XDR_INCLUDE_DIR NAMES rpc/types.h PATHS "/usr/include" "/usr/include/tirpc")' \ 'find_path(XDR_INCLUDE_DIR NAMES rpc/types.h PATH_SUFFIXES include/tirpc)' - '' + lib.optionalString (szip != null) '' + '' + lib.optionalString szipSupport '' export SZIP_INSTALL=${szip} ''; @@ -85,7 +86,7 @@ stdenv.mkDerivation rec { "-DJAVA_HOME=${jdk}" "-DJAVA_AWT_LIBRARY=${javabase}/libawt.so" "-DJAVA_JVM_LIBRARY=${javabase}/server/libjvm.so" - ] ++ lib.optionals (szip != null) [ + ] ++ lib.optionals szipSupport [ "-DHDF4_ENABLE_SZIP_ENCODING=ON" "-DHDF4_ENABLE_SZIP_SUPPORT=ON" ]; @@ -119,6 +120,17 @@ stdenv.mkDerivation rec { moveToOutput bin "$bin" ''; + passthru = { + inherit + uselibtirpc + libtirpc + szipSupport + szip + javaSupport + jdk + ; + }; + meta = with lib; { description = "Data model, library, and file format for storing and managing data"; homepage = "https://support.hdfgroup.org/products/hdf4/"; |