2010-08-02 10:58:53 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
2017-09-28 09:09:16 +02:00
|
|
|
, gcc
|
|
|
|
, removeReferencesTo
|
2015-10-19 14:57:24 +02:00
|
|
|
, cpp ? false
|
|
|
|
, gfortran ? null
|
2014-06-15 11:12:03 +02:00
|
|
|
, zlib ? null
|
2014-06-15 13:26:44 +02:00
|
|
|
, szip ? null
|
2014-07-01 15:55:12 +02:00
|
|
|
, mpi ? null
|
2014-07-02 15:10:02 +02:00
|
|
|
, enableShared ? true
|
2010-08-02 10:58:53 +02:00
|
|
|
}:
|
2015-11-11 15:14:28 +01:00
|
|
|
|
2015-11-20 10:59:22 +01:00
|
|
|
# cpp and mpi options are mutually exclusive
|
|
|
|
# (--enable-unsupported could be used to force the build)
|
|
|
|
assert !cpp || mpi == null;
|
|
|
|
|
2017-05-29 21:25:30 +02:00
|
|
|
# No point splitting version 1.8.18 into multiple outputs.
|
|
|
|
# The library /lib/libhdf5.so has a reference to gcc-wrapper
|
|
|
|
|
2017-02-09 02:52:13 +01:00
|
|
|
let inherit (stdenv.lib) optional optionals; in
|
2015-11-11 15:14:28 +01:00
|
|
|
|
2014-06-15 11:59:58 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2016-12-01 17:20:33 +01:00
|
|
|
version = "1.8.18";
|
2014-11-16 09:27:32 +01:00
|
|
|
name = "hdf5-${version}";
|
2010-08-02 10:58:53 +02:00
|
|
|
src = fetchurl {
|
2016-12-01 17:20:33 +01:00
|
|
|
url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/${name}/src/${name}.tar.bz2";
|
|
|
|
sha256 = "13542vrnl1p35n8vbq0wzk40vddmm33q5nh04j98c7r1yjnxxih1";
|
2016-08-28 19:28:31 +02:00
|
|
|
};
|
2014-06-15 11:12:03 +02:00
|
|
|
|
2014-07-01 15:55:12 +02:00
|
|
|
passthru = {
|
|
|
|
mpiSupport = (mpi != null);
|
|
|
|
inherit mpi;
|
|
|
|
};
|
|
|
|
|
2017-09-28 09:09:16 +02:00
|
|
|
nativeBuildInputs = [ removeReferencesTo ];
|
|
|
|
|
2014-06-15 11:12:03 +02:00
|
|
|
buildInputs = []
|
2015-11-11 15:14:28 +01:00
|
|
|
++ optional (gfortran != null) gfortran
|
|
|
|
++ optional (szip != null) szip;
|
2014-06-15 13:26:44 +02:00
|
|
|
|
2014-07-01 15:55:12 +02:00
|
|
|
propagatedBuildInputs = []
|
2016-07-19 12:07:23 +02:00
|
|
|
++ optional (zlib != null) zlib
|
2015-11-11 15:14:28 +01:00
|
|
|
++ optional (mpi != null) mpi;
|
|
|
|
|
|
|
|
configureFlags = []
|
|
|
|
++ optional cpp "--enable-cxx"
|
|
|
|
++ optional (gfortran != null) "--enable-fortran"
|
|
|
|
++ optional (szip != null) "--with-szlib=${szip}"
|
2015-11-20 10:59:22 +01:00
|
|
|
++ optionals (mpi != null) ["--enable-parallel" "CC=${mpi}/bin/mpicc"]
|
2015-11-11 15:14:28 +01:00
|
|
|
++ optional enableShared "--enable-shared";
|
|
|
|
|
2010-08-02 10:58:53 +02:00
|
|
|
patches = [./bin-mv.patch];
|
2015-11-11 15:14:28 +01:00
|
|
|
|
2017-09-28 09:09:16 +02:00
|
|
|
postInstall = ''
|
|
|
|
find "$out" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
|
|
|
|
'';
|
|
|
|
|
2010-08-02 10:58:53 +02:00
|
|
|
meta = {
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Data model, library, and file format for storing and managing data";
|
2010-08-02 10:58:53 +02:00
|
|
|
longDescription = ''
|
2013-10-06 11:49:53 +02:00
|
|
|
HDF5 supports an unlimited variety of datatypes, and is designed for flexible and efficient
|
2010-08-02 10:58:53 +02:00
|
|
|
I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing
|
|
|
|
applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and
|
|
|
|
applications for managing, manipulating, viewing, and analyzing data in the HDF5 format.
|
|
|
|
'';
|
2017-08-22 02:59:37 +02:00
|
|
|
license = stdenv.lib.licenses.free; # BSD-like
|
2017-08-02 23:50:51 +02:00
|
|
|
homepage = https://www.hdfgroup.org/HDF5/;
|
2017-09-22 18:56:49 +02:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2017-09-30 20:27:32 +02:00
|
|
|
broken = (gfortran != null) && stdenv.isDarwin;
|
2010-08-02 10:58:53 +02:00
|
|
|
};
|
|
|
|
}
|