netcdf: prevent bogus runtime dependency on gcc
Installation includes the the captured compilation settings in the outputs, and the full gcc path then leads to a bogus runtime dependency. To defeat this, we remove any occurrences of the compiler's store dir prefix from this file after installation.
This commit is contained in:
parent
cc87aef228
commit
b460e8bbb4
@ -3,6 +3,7 @@
|
||||
, hdf5
|
||||
, m4
|
||||
, curl # for DAP
|
||||
, removeReferencesTo
|
||||
}:
|
||||
|
||||
let
|
||||
@ -26,7 +27,7 @@ in stdenv.mkDerivation rec {
|
||||
done
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ m4 ];
|
||||
nativeBuildInputs = [ m4 removeReferencesTo ];
|
||||
buildInputs = [ hdf5 curl mpi ];
|
||||
|
||||
passthru = {
|
||||
@ -42,6 +43,12 @@ in stdenv.mkDerivation rec {
|
||||
]
|
||||
++ (stdenv.lib.optionals mpiSupport [ "--enable-parallel-tests" "CC=${mpi}/bin/mpicc" ]);
|
||||
|
||||
disallowedReferences = [ stdenv.cc ];
|
||||
|
||||
postFixup = ''
|
||||
remove-references-to -t ${stdenv.cc} "$(readlink -f $out/lib/libnetcdf.settings)"
|
||||
'';
|
||||
|
||||
doCheck = !mpiSupport;
|
||||
|
||||
meta = {
|
||||
|
Loading…
Reference in New Issue
Block a user