lol

Merge pull request #31781 from robertodr/hdf5-fortran-2003

Update HDF5 and add option to compile Fortran2003 interface

authored by

Frederik Rietdijk and committed by
GitHub
88eea694 6d9ad271

+87 -8
+76
pkgs/tools/misc/hdf5/1_8.nix
··· 1 + { stdenv 2 + , fetchurl 3 + , gcc 4 + , removeReferencesTo 5 + , cpp ? false 6 + , gfortran ? null 7 + , fortran2003 ? false 8 + , zlib ? null 9 + , szip ? null 10 + , mpi ? null 11 + , enableShared ? true 12 + }: 13 + 14 + # cpp and mpi options are mutually exclusive 15 + # (--enable-unsupported could be used to force the build) 16 + assert !cpp || mpi == null; 17 + 18 + # Need a Fortran compiler for Fortran2003 bindings 19 + assert fortran2003 -> gfortran != null; 20 + 21 + # No point splitting version 1.8.18 into multiple outputs. 22 + # The library /lib/libhdf5.so has a reference to gcc-wrapper 23 + 24 + let inherit (stdenv.lib) optional optionals; in 25 + 26 + stdenv.mkDerivation rec { 27 + version = "1.8.19"; 28 + name = "hdf5-${version}"; 29 + src = fetchurl { 30 + url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/${name}/src/${name}.tar.bz2"; 31 + sha256 = "0f3jfbqpaaq21ighi40qzs52nb52kc2d2yjk541rjmsx20b3ih2r" ; 32 + }; 33 + 34 + passthru = { 35 + mpiSupport = (mpi != null); 36 + inherit mpi; 37 + }; 38 + 39 + nativeBuildInputs = [ removeReferencesTo ]; 40 + 41 + buildInputs = [] 42 + ++ optional (gfortran != null) gfortran 43 + ++ optional (szip != null) szip; 44 + 45 + propagatedBuildInputs = [] 46 + ++ optional (zlib != null) zlib 47 + ++ optional (mpi != null) mpi; 48 + 49 + configureFlags = [] 50 + ++ optional cpp "--enable-cxx" 51 + ++ optional (gfortran != null) "--enable-fortran" 52 + ++ optional fortran2003 "--enable-fortran2003" 53 + ++ optional (szip != null) "--with-szlib=${szip}" 54 + ++ optionals (mpi != null) ["--enable-parallel" "CC=${mpi}/bin/mpicc"] 55 + ++ optional enableShared "--enable-shared"; 56 + 57 + patches = [./bin-mv.patch]; 58 + 59 + postInstall = '' 60 + find "$out" -type f -exec remove-references-to -t ${stdenv.cc} '{}' + 61 + ''; 62 + 63 + meta = { 64 + description = "Data model, library, and file format for storing and managing data"; 65 + longDescription = '' 66 + HDF5 supports an unlimited variety of datatypes, and is designed for flexible and efficient 67 + I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing 68 + applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and 69 + applications for managing, manipulating, viewing, and analyzing data in the HDF5 format. 70 + ''; 71 + license = stdenv.lib.licenses.free; # BSD-like 72 + homepage = https://www.hdfgroup.org/HDF5/; 73 + platforms = stdenv.lib.platforms.unix; 74 + broken = (gfortran != null) && stdenv.isDarwin; 75 + }; 76 + }
+5 -8
pkgs/tools/misc/hdf5/default.nix
··· 14 14 # (--enable-unsupported could be used to force the build) 15 15 assert !cpp || mpi == null; 16 16 17 - # No point splitting version 1.8.18 into multiple outputs. 18 - # The library /lib/libhdf5.so has a reference to gcc-wrapper 19 - 20 17 let inherit (stdenv.lib) optional optionals; in 21 18 22 19 stdenv.mkDerivation rec { 23 - version = "1.8.18"; 20 + version = "1.10.1"; 24 21 name = "hdf5-${version}"; 25 22 src = fetchurl { 26 - url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/${name}/src/${name}.tar.bz2"; 27 - sha256 = "13542vrnl1p35n8vbq0wzk40vddmm33q5nh04j98c7r1yjnxxih1"; 23 + url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/${name}/src/${name}.tar.bz2"; 24 + sha256 = "1wpbi15za7kbsvih88kfcxblw412pjndl16x88dgnqr47piy2p4w"; 28 25 }; 29 26 30 27 passthru = { ··· 59 56 description = "Data model, library, and file format for storing and managing data"; 60 57 longDescription = '' 61 58 HDF5 supports an unlimited variety of datatypes, and is designed for flexible and efficient 62 - I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing 63 - applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and 59 + I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing 60 + applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and 64 61 applications for managing, manipulating, viewing, and analyzing data in the HDF5 format. 65 62 ''; 66 63 license = stdenv.lib.licenses.free; # BSD-like
+6
pkgs/top-level/all-packages.nix
··· 2590 2590 mpi = null; 2591 2591 }; 2592 2592 2593 + hdf5_1_8 = callPackage ../tools/misc/hdf5/1_8.nix { 2594 + gfortran = null; 2595 + szip = null; 2596 + mpi = null; 2597 + }; 2598 + 2593 2599 hdf5-mpi = appendToName "mpi" (hdf5.override { 2594 2600 szip = null; 2595 2601 mpi = pkgs.openmpi;