2010-08-02 01:58:53 -07:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
2017-09-28 00:09:16 -07:00
|
|
|
, removeReferencesTo
|
2015-10-19 05:57:24 -07:00
|
|
|
, cpp ? false
|
|
|
|
, gfortran ? null
|
2014-06-15 02:12:03 -07:00
|
|
|
, zlib ? null
|
2014-06-15 04:26:44 -07:00
|
|
|
, szip ? null
|
2014-07-01 06:55:12 -07:00
|
|
|
, mpi ? null
|
2014-07-02 06:10:02 -07:00
|
|
|
, enableShared ? true
|
2010-08-02 01:58:53 -07:00
|
|
|
}:
|
2015-11-11 06:14:28 -08:00
|
|
|
|
2015-11-20 01:59:22 -08:00
|
|
|
# cpp and mpi options are mutually exclusive
|
|
|
|
# (--enable-unsupported could be used to force the build)
|
|
|
|
assert !cpp || mpi == null;
|
|
|
|
|
2017-02-08 17:52:13 -08:00
|
|
|
let inherit (stdenv.lib) optional optionals; in
|
2015-11-11 06:14:28 -08:00
|
|
|
|
2014-06-15 02:59:58 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2019-04-02 07:26:05 -07:00
|
|
|
version = "1.10.5";
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "hdf5";
|
2010-08-02 01:58:53 -07:00
|
|
|
src = fetchurl {
|
2019-08-15 05:41:18 -07:00
|
|
|
url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/${pname}-${version}/src/${pname}-${version}.tar.bz2";
|
2019-04-02 07:26:05 -07:00
|
|
|
sha256 = "0i3g6v521vigzbx8wpd32ibsiiw92r65ca3qdbn0d8fj8f4fmmk8";
|
2019-02-21 05:04:05 -08:00
|
|
|
};
|
2014-06-15 02:12:03 -07:00
|
|
|
|
2014-07-01 06:55:12 -07:00
|
|
|
passthru = {
|
|
|
|
mpiSupport = (mpi != null);
|
|
|
|
inherit mpi;
|
|
|
|
};
|
|
|
|
|
2019-09-25 08:13:12 -07:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2017-09-28 00:09:16 -07:00
|
|
|
nativeBuildInputs = [ removeReferencesTo ];
|
|
|
|
|
2014-06-15 02:12:03 -07:00
|
|
|
buildInputs = []
|
2015-11-11 06:14:28 -08:00
|
|
|
++ optional (gfortran != null) gfortran
|
|
|
|
++ optional (szip != null) szip;
|
2014-06-15 04:26:44 -07:00
|
|
|
|
2014-07-01 06:55:12 -07:00
|
|
|
propagatedBuildInputs = []
|
2016-07-19 03:07:23 -07:00
|
|
|
++ optional (zlib != null) zlib
|
2015-11-11 06:14:28 -08:00
|
|
|
++ optional (mpi != null) mpi;
|
|
|
|
|
|
|
|
configureFlags = []
|
|
|
|
++ optional cpp "--enable-cxx"
|
|
|
|
++ optional (gfortran != null) "--enable-fortran"
|
|
|
|
++ optional (szip != null) "--with-szlib=${szip}"
|
2015-11-20 01:59:22 -08:00
|
|
|
++ optionals (mpi != null) ["--enable-parallel" "CC=${mpi}/bin/mpicc"]
|
2015-11-11 06:14:28 -08:00
|
|
|
++ optional enableShared "--enable-shared";
|
|
|
|
|
2019-02-21 05:04:05 -08:00
|
|
|
patches = [
|
|
|
|
./bin-mv.patch
|
|
|
|
];
|
2015-11-11 06:14:28 -08:00
|
|
|
|
2017-09-28 00:09:16 -07:00
|
|
|
postInstall = ''
|
|
|
|
find "$out" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
|
2019-09-27 03:53:14 -07:00
|
|
|
moveToOutput 'bin/h5cc' "''${!outputDev}"
|
|
|
|
moveToOutput 'bin/h5c++' "''${!outputDev}"
|
|
|
|
moveToOutput 'bin/h5fc' "''${!outputDev}"
|
|
|
|
moveToOutput 'bin/h5pcc' "''${!outputDev}"
|
2017-09-28 00:09:16 -07:00
|
|
|
'';
|
|
|
|
|
2010-08-02 01:58:53 -07:00
|
|
|
meta = {
|
2013-10-06 02:49:53 -07:00
|
|
|
description = "Data model, library, and file format for storing and managing data";
|
2010-08-02 01:58:53 -07:00
|
|
|
longDescription = ''
|
2013-10-06 02:49:53 -07:00
|
|
|
HDF5 supports an unlimited variety of datatypes, and is designed for flexible and efficient
|
2017-11-17 14:14:31 -08: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
|
2010-08-02 01:58:53 -07:00
|
|
|
applications for managing, manipulating, viewing, and analyzing data in the HDF5 format.
|
|
|
|
'';
|
2018-11-15 08:04:24 -08:00
|
|
|
license = stdenv.lib.licenses.bsd3; # Lawrence Berkeley National Labs BSD 3-Clause variant
|
2017-08-02 14:50:51 -07:00
|
|
|
homepage = https://www.hdfgroup.org/HDF5/;
|
2017-09-22 09:56:49 -07:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2017-09-30 11:27:32 -07:00
|
|
|
broken = (gfortran != null) && stdenv.isDarwin;
|
2010-08-02 01:58:53 -07:00
|
|
|
};
|
|
|
|
}
|