hdf5: Add mpi support

Optionally, build the parallel version of hdf5.
This commit is contained in:
Andreas Herrmann 2014-07-01 15:55:12 +02:00
parent a1a9c26ccc
commit 8346343aa5

View file

@ -3,6 +3,7 @@
, fetchurl
, zlib ? null
, szip ? null
, mpi ? null
}:
stdenv.mkDerivation rec {
version = "1.8.13";
@ -12,11 +13,22 @@ stdenv.mkDerivation rec {
sha256 = "1h9qdl321gzm3ihdhlijbl9sh9qcdrw94j7izg64yfqhxj7b7xl2";
};
passthru = {
mpiSupport = (mpi != null);
inherit mpi;
};
buildInputs = []
++ stdenv.lib.optional (zlib != null) zlib
++ stdenv.lib.optional (szip != null) szip;
configureFlags = if szip != null then "--with-szlib=${szip}" else "";
propagatedBuildInputs = []
++ stdenv.lib.optional (mpi != null) mpi;
configureFlags = "
${if szip != null then "--with-szlib=${szip}" else ""}
${if mpi != null then "--enable-parallel" else ""}
";
patches = [./bin-mv.patch];