2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, netcdf, hdf5, curl, cmake, ninja }:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "netcdf-cxx4";
|
2021-05-03 20:48:10 +00:00
|
|
|
version = "4.3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Unidata";
|
|
|
|
repo = "netcdf-cxx4";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-GZ6n7dW3l8Kqrk2Xp2mxRTUWWQj0XEd2LDTG9EtrfhY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
patches = [
|
|
|
|
# This fix is included upstream, remove with next upgrade
|
|
|
|
./cmake-h5free.patch
|
|
|
|
];
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cmakeFlags+="-Dabs_top_srcdir=$(readlink -f ./)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ninja ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ netcdf hdf5 curl ];
|
2021-05-03 20:48:10 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
doCheck = true;
|
2021-05-03 20:48:10 +00:00
|
|
|
enableParallelChecking = false;
|
2023-03-04 12:14:45 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HDF5_PLUGIN_PATH=${netcdf}/lib/hdf5-plugins
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "C++ API to manipulate netcdf files";
|
|
|
|
homepage = "https://www.unidata.ucar.edu/software/netcdf/";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.free;
|
|
|
|
platforms = lib.platforms.unix;
|
2023-11-16 04:20:00 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|