···11+{ stdenv
22+, fetchurl
33+, gcc
44+, removeReferencesTo
55+, cpp ? false
66+, gfortran ? null
77+, fortran2003 ? false
88+, zlib ? null
99+, szip ? null
1010+, mpi ? null
1111+, enableShared ? true
1212+}:
1313+1414+# cpp and mpi options are mutually exclusive
1515+# (--enable-unsupported could be used to force the build)
1616+assert !cpp || mpi == null;
1717+1818+# Need a Fortran compiler for Fortran2003 bindings
1919+assert fortran2003 -> gfortran != null;
2020+2121+# No point splitting version 1.8.18 into multiple outputs.
2222+# The library /lib/libhdf5.so has a reference to gcc-wrapper
2323+2424+let inherit (stdenv.lib) optional optionals; in
2525+2626+stdenv.mkDerivation rec {
2727+ version = "1.8.19";
2828+ name = "hdf5-${version}";
2929+ src = fetchurl {
3030+ url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/${name}/src/${name}.tar.bz2";
3131+ sha256 = "0f3jfbqpaaq21ighi40qzs52nb52kc2d2yjk541rjmsx20b3ih2r" ;
3232+ };
3333+3434+ passthru = {
3535+ mpiSupport = (mpi != null);
3636+ inherit mpi;
3737+ };
3838+3939+ nativeBuildInputs = [ removeReferencesTo ];
4040+4141+ buildInputs = []
4242+ ++ optional (gfortran != null) gfortran
4343+ ++ optional (szip != null) szip;
4444+4545+ propagatedBuildInputs = []
4646+ ++ optional (zlib != null) zlib
4747+ ++ optional (mpi != null) mpi;
4848+4949+ configureFlags = []
5050+ ++ optional cpp "--enable-cxx"
5151+ ++ optional (gfortran != null) "--enable-fortran"
5252+ ++ optional fortran2003 "--enable-fortran2003"
5353+ ++ optional (szip != null) "--with-szlib=${szip}"
5454+ ++ optionals (mpi != null) ["--enable-parallel" "CC=${mpi}/bin/mpicc"]
5555+ ++ optional enableShared "--enable-shared";
5656+5757+ patches = [./bin-mv.patch];
5858+5959+ postInstall = ''
6060+ find "$out" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
6161+ '';
6262+6363+ meta = {
6464+ description = "Data model, library, and file format for storing and managing data";
6565+ longDescription = ''
6666+ HDF5 supports an unlimited variety of datatypes, and is designed for flexible and efficient
6767+ I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing
6868+ applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and
6969+ applications for managing, manipulating, viewing, and analyzing data in the HDF5 format.
7070+ '';
7171+ license = stdenv.lib.licenses.free; # BSD-like
7272+ homepage = https://www.hdfgroup.org/HDF5/;
7373+ platforms = stdenv.lib.platforms.unix;
7474+ broken = (gfortran != null) && stdenv.isDarwin;
7575+ };
7676+}
+5-8
pkgs/tools/misc/hdf5/default.nix
···1414# (--enable-unsupported could be used to force the build)
1515assert !cpp || mpi == null;
16161717-# No point splitting version 1.8.18 into multiple outputs.
1818-# The library /lib/libhdf5.so has a reference to gcc-wrapper
1919-2017let inherit (stdenv.lib) optional optionals; in
21182219stdenv.mkDerivation rec {
2323- version = "1.8.18";
2020+ version = "1.10.1";
2421 name = "hdf5-${version}";
2522 src = fetchurl {
2626- url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/${name}/src/${name}.tar.bz2";
2727- sha256 = "13542vrnl1p35n8vbq0wzk40vddmm33q5nh04j98c7r1yjnxxih1";
2323+ url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/${name}/src/${name}.tar.bz2";
2424+ sha256 = "1wpbi15za7kbsvih88kfcxblw412pjndl16x88dgnqr47piy2p4w";
2825 };
29263027 passthru = {
···5956 description = "Data model, library, and file format for storing and managing data";
6057 longDescription = ''
6158 HDF5 supports an unlimited variety of datatypes, and is designed for flexible and efficient
6262- I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing
6363- applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and
5959+ I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing
6060+ applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and
6461 applications for managing, manipulating, viewing, and analyzing data in the HDF5 format.
6562 '';
6663 license = stdenv.lib.licenses.free; # BSD-like