@@ -3,6 +3,7 @@
33, hdf5
44, m4
55, curl # for DAP
6+, removeReferencesTo
67}:
78
89let
@@ -26,7 +27,7 @@ in stdenv.mkDerivation rec {
2627 done
2728 '';
2829
29− nativeBuildInputs = [ m4 ];
30+ nativeBuildInputs = [ m4 removeReferencesTo ];
3031 buildInputs = [ hdf5 curl mpi ];
3132
3233 passthru = {
@@ -42,6 +43,12 @@ in stdenv.mkDerivation rec {
4243 ]
4344 ++ (stdenv.lib.optionals mpiSupport [ "--enable-parallel-tests" "CC=${mpi}/bin/mpicc" ]);
4445
46+ disallowedReferences = [ stdenv.cc ];
47+
48+ postFixup = ''
49+ remove-references-to -t ${stdenv.cc} "$(readlink -f $out/lib/libnetcdf.settings)"
50+ '';
51+
4552 doCheck = !mpiSupport;
4653
4754 meta = {