diff --git a/pkgs/applications/science/biology/minc-tools/default.nix b/pkgs/applications/science/biology/minc-tools/default.nix index d4b98fce8719..8cd3cf2b81ad 100644 --- a/pkgs/applications/science/biology/minc-tools/default.nix +++ b/pkgs/applications/science/biology/minc-tools/default.nix @@ -50,6 +50,8 @@ stdenv.mkDerivation rec { "-DNIFTI_INCLUDE_DIR=${nifticlib}/include/nifti" ]; + env.NIX_CFLAGS_COMPILE = "-D_FillValue=NC_FillValue"; + postFixup = '' for prog in minccomplete minchistory mincpik; do wrapProgram $out/bin/$prog --prefix PERL5LIB : $PERL5LIB @@ -62,5 +64,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ bcdarwin ]; platforms = platforms.unix; license = licenses.free; + broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/ne/netcdf/package.nix b/pkgs/by-name/ne/netcdf/package.nix index 1bdaf7068552..42aa89ab7d94 100644 --- a/pkgs/by-name/ne/netcdf/package.nix +++ b/pkgs/by-name/ne/netcdf/package.nix @@ -20,11 +20,11 @@ let in stdenv.mkDerivation rec { pname = "netcdf" + lib.optionalString mpiSupport "-mpi"; - version = "4.9.2"; + version = "4.9.3"; src = fetchurl { url = "https://downloads.unidata.ucar.edu/netcdf-c/${version}/netcdf-c-${version}.tar.gz"; - hash = "sha256-zxG6u725lj8J9VB54LAZ9tA3H1L44SZKW6jp/asabEg="; + hash = "sha256-pHQUmETmFEVmZz+s8Jf+olPchDw3vAp9PeBH3Irdpd0="; }; postPatch = '' diff --git a/pkgs/by-name/ne/netcdfcxx4/netcdf.patch b/pkgs/by-name/ne/netcdfcxx4/netcdf.patch new file mode 100644 index 000000000000..ad1d65a5da77 --- /dev/null +++ b/pkgs/by-name/ne/netcdfcxx4/netcdf.patch @@ -0,0 +1,49 @@ +From b819b3616b96352d23cdf0840df9e6674437948c Mon Sep 17 00:00:00 2001 +From: Orion Poplawski +Date: Mon, 17 Feb 2025 15:17:28 -0700 +Subject: [PATCH] Use HAVE_NC_SET_LOG_LEVEL to determine usage of + nc_set_log_level (fixes #161) + +--- + cxx4/test_filter.cpp | 2 ++ + examples/pres_temp_4D_plugin_wr.cpp | 4 ++++ + 2 files changed, 6 insertions(+) + +diff --git a/cxx4/test_filter.cpp b/cxx4/test_filter.cpp +index 879ba71..f442c64 100644 +--- a/cxx4/test_filter.cpp ++++ b/cxx4/test_filter.cpp +@@ -30,7 +30,9 @@ int main() + try + { + NcFile test("pres_temp_plugin_4D.nc", NcFile::replace); ++#ifdef HAVE_NC_SET_LOG_LEVEL + nc_set_log_level(5); ++#endif + // Define the dimensions. NetCDF will hand back an ncDim object for + // each. + NcDim latDim = test.addDim(LAT_NAME, NLAT); +diff --git a/examples/pres_temp_4D_plugin_wr.cpp b/examples/pres_temp_4D_plugin_wr.cpp +index 832d2a6..584e8be 100644 +--- a/examples/pres_temp_4D_plugin_wr.cpp ++++ b/examples/pres_temp_4D_plugin_wr.cpp +@@ -71,7 +71,9 @@ string LON_UNITS = "degrees_east"; + + int main() + { ++#ifdef HAVE_NC_SET_LOG_LEVEL + nc_set_log_level(5); ++#endif + // We will write latitude and longitude fields. + float lats[NLAT],lons[NLON]; + +@@ -103,7 +105,9 @@ int main() + + // Create the file. + NcFile test(FILE_NAME, NcFile::replace); ++#ifdef HAVE_NC_SET_LOG_LEVEL + nc_set_log_level(5); ++#endif + // Define the dimensions. NetCDF will hand back an ncDim object for + // each. + NcDim lvlDim = test.addDim(LVL_NAME, NLVL); diff --git a/pkgs/by-name/ne/netcdfcxx4/package.nix b/pkgs/by-name/ne/netcdfcxx4/package.nix index a94c3bde5624..b96c8f89f6ed 100644 --- a/pkgs/by-name/ne/netcdfcxx4/package.nix +++ b/pkgs/by-name/ne/netcdfcxx4/package.nix @@ -22,6 +22,7 @@ stdenv.mkDerivation rec { patches = [ # This fix is included upstream, remove with next upgrade ./cmake-h5free.patch + ./netcdf.patch ]; preConfigure = ''