diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix index bcfca5fddb5d..5981cdc3a5c3 100644 --- a/pkgs/tools/misc/hdf5/default.nix +++ b/pkgs/tools/misc/hdf5/default.nix @@ -1,6 +1,8 @@ { stdenv , fetchurl +, cpp ? false +, gfortran ? null , zlib ? null , szip ? null , mpi ? null @@ -20,6 +22,7 @@ stdenv.mkDerivation rec { }; buildInputs = [] + ++ stdenv.lib.optional (gfortran != null) gfortran ++ stdenv.lib.optional (zlib != null) zlib ++ stdenv.lib.optional (szip != null) szip; @@ -27,6 +30,8 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional (mpi != null) mpi; configureFlags = " + ${if cpp then "--enable-cxx" else ""} + ${if gfortran != null then "--enable-fortran" else ""} ${if szip != null then "--with-szlib=${szip}" else ""} ${if mpi != null then "--enable-parallel" else ""} ${if enableShared then "--enable-shared" else ""} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 634ec4fdbd16..3916505c7f88 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1814,6 +1814,7 @@ let hddtemp = callPackage ../tools/misc/hddtemp { }; hdf5 = callPackage ../tools/misc/hdf5 { + gfortran = null; szip = null; mpi = null; }; @@ -1823,6 +1824,14 @@ let mpi = pkgs.openmpi; }; + hdf5-cpp = hdf5.override { + cpp = true; + }; + + hdf5-fortran = hdf5.override { + inherit gfortran; + }; + heimdall = callPackage ../tools/misc/heimdall { }; hevea = callPackage ../tools/typesetting/hevea { };