2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, boost
|
|
|
|
, eigen
|
|
|
|
, hdf5
|
|
|
|
, mpiSupport ? hdf5.mpiSupport
|
|
|
|
, mpi ? hdf5.mpi
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert mpiSupport -> mpi != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "highfive${lib.optionalString mpiSupport "-mpi"}";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2.10.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "BlueBrain";
|
|
|
|
repo = "HighFive";
|
2022-01-19 23:45:15 +00:00
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
sha256 = "sha256-0ACT899G+CCc08UFsSC8SnUEZR2mrpQbqXW9FklRAjU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
buildInputs = [ boost eigen hdf5 ];
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit mpiSupport mpi;
|
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DHIGHFIVE_USE_BOOST=ON"
|
|
|
|
"-DHIGHFIVE_USE_EIGEN=ON"
|
|
|
|
"-DHIGHFIVE_EXAMPLES=OFF"
|
|
|
|
"-DHIGHFIVE_UNIT_TESTS=OFF"
|
|
|
|
"-DHIGHFIVE_USE_INSTALL_DEPS=ON"
|
|
|
|
]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ (lib.optionals mpiSupport [ "-DHIGHFIVE_PARALLEL_HDF5=ON" ]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Header-only C++ HDF5 interface";
|
|
|
|
license = licenses.boost;
|
|
|
|
homepage = "https://bluebrain.github.io/HighFive/";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ robertodr ];
|
|
|
|
};
|
|
|
|
}
|