nixpkgs/pkgs/development/libraries/highfive/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv
, fetchFromGitHub
, cmake
, boost
, eigen
, hdf5
, mpiSupport ? hdf5.mpiSupport
, mpi ? hdf5.mpi
}:
assert mpiSupport -> mpi != null;
stdenv.mkDerivation rec {
pname = "highfive${lib.optionalString mpiSupport "-mpi"}";
2022-07-28 14:37:26 +00:00
version = "2.4.1";
src = fetchFromGitHub {
owner = "BlueBrain";
repo = "HighFive";
2022-01-18 16:23:50 +00:00
rev = "v${version}";
2022-07-28 14:37:26 +00:00
sha256 = "sha256-P60S3UR8wC3BHxRiqFdSjn6Akvykud40g5yEko5dIjw=";
};
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"
]
++ (lib.optionals mpiSupport [ "-DHIGHFIVE_PARALLEL_HDF5=ON" ]);
meta = with lib; {
description = "Header-only C++ HDF5 interface";
license = licenses.boost;
homepage = "https://bluebrain.github.io/HighFive/";
platforms = platforms.unix;
maintainers = with maintainers; [ robertodr ];
};
}