diff options
author | Steve Purcell <steve@sanityinc.com> | 2020-06-11 00:57:10 +0000 |
---|---|---|
committer | Steve Purcell <steve@sanityinc.com> | 2020-06-14 21:53:38 +0000 |
commit | b460e8bbb49f22adb6af23a8391bbc7b8649a8a3 (patch) | |
tree | 38464bf3334c4c10e1f007d4c95cc18d592418ce /pkgs/development/libraries/netcdf | |
parent | cc87aef2284f4259ce8090e10aa26754024e3f91 (diff) |
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.
Diffstat (limited to 'pkgs/development/libraries/netcdf')
-rw-r--r-- | pkgs/development/libraries/netcdf/default.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/development/libraries/netcdf/default.nix b/pkgs/development/libraries/netcdf/default.nix index 2e16f58d9fb5a..fecc4100f5e67 100644 --- a/pkgs/development/libraries/netcdf/default.nix +++ b/pkgs/development/libraries/netcdf/default.nix @@ -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 = { |