Merge pull request #253762 from reckenrode/netcdf-fix

netcdf: fix build with clang 16 and tests on aarch64-darwin
This commit is contained in:
Rick van Schijndel 2023-09-07 23:11:58 +02:00 committed by GitHub
commit 9c28500602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

@ -16,11 +16,11 @@ let
inherit (hdf5) mpiSupport mpi;
in stdenv.mkDerivation rec {
pname = "netcdf" + lib.optionalString mpiSupport "-mpi";
version = "4.9.0";
version = "4.9.2";
src = fetchurl {
url = "https://downloads.unidata.ucar.edu/netcdf-c/${version}/netcdf-c-${version}.tar.gz";
hash = "sha256-TJVgIrecCOXhTu6N9RsTwo5hIcK35/qtwhs3WUlAC0k=";
hash = "sha256-zxG6u725lj8J9VB54LAZ9tA3H1L44SZKW6jp/asabEg=";
};
postPatch = ''
@ -30,6 +30,10 @@ in stdenv.mkDerivation rec {
for a in ncdap_test/Makefile.am ncdap_test/Makefile.in; do
substituteInPlace $a --replace testurl.sh " "
done
# Prevent building the tests from prepending `#!/bin/bash` and wiping out the patched shenbangs.
substituteInPlace nczarr_test/Makefile.in \
--replace '#!/bin/bash' '${stdenv.shell}'
'';
nativeBuildInputs = [ m4 removeReferencesTo ];
@ -65,7 +69,7 @@ in stdenv.mkDerivation rec {
remove-references-to -t ${stdenv.cc} "$(readlink -f $out/lib/libnetcdf.settings)"
'';
doCheck = !(mpiSupport || (stdenv.isDarwin && stdenv.isAarch64));
doCheck = !mpiSupport;
nativeCheckInputs = [ unzip ];
preCheck = ''

@ -11025,9 +11025,7 @@ with pkgs;
netavark = callPackage ../tools/networking/netavark { };
netcdf = callPackage ../development/libraries/netcdf {
hdf5 = hdf5.override { usev110Api = true; };
};
netcdf = callPackage ../development/libraries/netcdf { };
netcdf-mpi = netcdf.override {
hdf5 = hdf5-mpi.override { usev110Api = true; };