git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #90116 from purcell/netcdf-no-gcc-at-runtime

netcdf: prevent bogus runtime dependency on gcc

commit49dc0245c4a8579068eb76991688c88c787cd26b authorMario Rodas <marsam@users.noreply.github.com> dateSun 16 Aug 2020, 00:37 (6 years ago) parent3bb5418b460e8b
1 file changed+8−1
pkgs/development/libraries/netcdf/default.nix+8−1
pkgs/development/libraries/netcdf/default.nix+8−1
@@ -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 = {