hdf4: fix invalid rpath on darwin
CMake changes in hdf4 v4.15.2 broke the library path on macOS,
linking using an invalid rpath rather than an absolute path.
Before this commit:
```
otool -L result/lib/libhdf.dylib
result/lib/libhdf.dylib:
@rpath/libhdf.4.dylib (compatibility version 4.0.0, current version 4.15.2)
```
After:
```
otool -L result/lib/libhdf.dylib
result/lib/libhdf.dylib:
/nix/store/bz52b2gwci0k8rwd0llsi555s1hx166j-hdf-4.2.15/lib/libhdf.4.15.2.dylib (compatibility version 4.0.0, current version 4.15.2)
```
commit81f07a616237bef8619c64fb3cf998ca85503799
authorRyan Burns <rtburns-jpl@users.noreply.github.com>
dateMon 28 Dec 2020, 14:02 (6 years ago)
parentd0ecbe6
pkgs/tools/misc/hdf4/default.nix+3
@@ -1,6 +1,7 @@
11{ stdenv
22, fetchpatch
33, fetchurl
4+, fixDarwinDylibNames
45, cmake
56, libjpeg
67, zlib
@@ -17,6 +18,8 @@ stdenv.mkDerivation rec {
1718
1819 nativeBuildInputs = [
1920 cmake
21+ ] ++ stdenv.lib.optionals stdenv.isDarwin [
22+ fixDarwinDylibNames
2023 ];
2124
2225 buildInputs = [