summary refs log tree commit diff
path: root/pkgs/tools/misc/hdf4
diff options
context:
space:
mode:
authorRyan Burns <rtburns-jpl@users.noreply.github.com>2020-12-28 14:02:48 -0800
committerRyan Burns <rtburns-jpl@users.noreply.github.com>2020-12-28 14:16:14 -0800
commit81f07a616237bef8619c64fb3cf998ca85503799 (patch)
tree2f3d6bd472fb728d8173d2fd0b9090d21c308f0d /pkgs/tools/misc/hdf4
parentd0ecbe67b86731e0efd5c8de3c42d0b24ef28c32 (diff)
downloadnixpkgs-81f07a616237bef8619c64fb3cf998ca85503799.tar
nixpkgs-81f07a616237bef8619c64fb3cf998ca85503799.tar.gz
nixpkgs-81f07a616237bef8619c64fb3cf998ca85503799.tar.bz2
nixpkgs-81f07a616237bef8619c64fb3cf998ca85503799.tar.lz
nixpkgs-81f07a616237bef8619c64fb3cf998ca85503799.tar.xz
nixpkgs-81f07a616237bef8619c64fb3cf998ca85503799.tar.zst
nixpkgs-81f07a616237bef8619c64fb3cf998ca85503799.zip
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)
```
Diffstat (limited to 'pkgs/tools/misc/hdf4')
-rw-r--r--pkgs/tools/misc/hdf4/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/tools/misc/hdf4/default.nix b/pkgs/tools/misc/hdf4/default.nix
index 5e5154111dc..b15eba8b7bc 100644
--- a/pkgs/tools/misc/hdf4/default.nix
+++ b/pkgs/tools/misc/hdf4/default.nix
@@ -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 = [