git.iko.soy/typeable/nixpkgs
on master help sign in
hdf4: fix build on darwin

The fix here is to not include libtirc on Darwin, on which platform the library is unavailable.

commit0f4be28af526a8421efeb820e529f66d083cb0a2 authorSteve Purcell <steve@sanityinc.com> dateWed 6 Jan 2021, 13:03 (6 years ago) parentd897e8e
1 file changed+5−3
pkgs/tools/misc/hdf4/default.nix+5−3
pkgs/tools/misc/hdf4/default.nix+5−3
@@ -8,7 +8,8 @@
88, zlib
99, szip ? null
1010}:
11−
11+let uselibtirpc = stdenv.isLinux;
12+in
1213stdenv.mkDerivation rec {
1314 pname = "hdf";
1415 version = "4.2.15";
@@ -49,12 +50,13 @@ stdenv.mkDerivation rec {
4950
5051 buildInputs = [
5152 libjpeg
52− libtirpc
5353 szip
5454 zlib
55+ ] ++ stdenv.lib.optionals uselibtirpc [
56+ libtirpc
5557 ];
5658
57− preConfigure = ''
59+ preConfigure = stdenv.lib.optionalString uselibtirpc ''
5860 # Make tirpc discovery work with CMAKE_PREFIX_PATH
5961 substituteInPlace config/cmake/FindXDR.cmake \
6062 --replace 'find_path(XDR_INCLUDE_DIR NAMES rpc/types.h PATHS "/usr/include" "/usr/include/tirpc")' \