From fa0b3b9392e637c5a21e114800a755aae244f542 Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Sun, 28 Jul 2024 09:55:43 -0500 Subject: [PATCH] netcdf: fix darwin and more broadly clang builds --- pkgs/development/libraries/netcdf/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/netcdf/default.nix b/pkgs/development/libraries/netcdf/default.nix index 0796e7997d50..65e8b6f46dfd 100644 --- a/pkgs/development/libraries/netcdf/default.nix +++ b/pkgs/development/libraries/netcdf/default.nix @@ -52,6 +52,11 @@ in stdenv.mkDerivation rec { inherit mpiSupport mpi; }; + env.NIX_CFLAGS_COMPILE = + # Suppress incompatible function pointer errors when building with newer versions of clang 16. + # tracked upstream here: https://github.com/Unidata/netcdf-c/issues/2715 + lib.optionalString stdenv.cc.isClang "-Wno-error=incompatible-function-pointer-types"; + configureFlags = [ "--enable-netcdf-4" "--enable-dap"