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)
```
This commit is contained in:
Ryan Burns 2020-12-28 14:02:48 -08:00
parent d0ecbe67b8
commit 81f07a6162

View file

@ -1,6 +1,7 @@
{ stdenv
, fetchpatch
, fetchurl
, fixDarwinDylibNames
, cmake
, libjpeg
, zlib
@ -17,6 +18,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
cmake
] ++ stdenv.lib.optionals stdenv.isDarwin [
fixDarwinDylibNames
];
buildInputs = [