diff options
author | Steve Purcell <steve@sanityinc.com> | 2021-01-06 13:03:51 +1300 |
---|---|---|
committer | Steve Purcell <steve@sanityinc.com> | 2021-01-07 11:51:22 +1300 |
commit | 0f4be28af526a8421efeb820e529f66d083cb0a2 (patch) | |
tree | 927d26da36700d2952f115bb0f08eced1e1db111 /pkgs/tools/misc/hdf4 | |
parent | d897e8e0ebc50943d434fe54a1edae3e53669316 (diff) | |
download | nixpkgs-0f4be28af526a8421efeb820e529f66d083cb0a2.tar nixpkgs-0f4be28af526a8421efeb820e529f66d083cb0a2.tar.gz nixpkgs-0f4be28af526a8421efeb820e529f66d083cb0a2.tar.bz2 nixpkgs-0f4be28af526a8421efeb820e529f66d083cb0a2.tar.lz nixpkgs-0f4be28af526a8421efeb820e529f66d083cb0a2.tar.xz nixpkgs-0f4be28af526a8421efeb820e529f66d083cb0a2.tar.zst nixpkgs-0f4be28af526a8421efeb820e529f66d083cb0a2.zip |
hdf4: fix build on darwin
The fix here is to not include libtirc on Darwin, on which platform the library is unavailable.
Diffstat (limited to 'pkgs/tools/misc/hdf4')
-rw-r--r-- | pkgs/tools/misc/hdf4/default.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/tools/misc/hdf4/default.nix b/pkgs/tools/misc/hdf4/default.nix index a1aff857527..b5269a15867 100644 --- a/pkgs/tools/misc/hdf4/default.nix +++ b/pkgs/tools/misc/hdf4/default.nix @@ -8,7 +8,8 @@ , zlib , szip ? null }: - +let uselibtirpc = stdenv.isLinux; +in stdenv.mkDerivation rec { pname = "hdf"; version = "4.2.15"; @@ -49,12 +50,13 @@ stdenv.mkDerivation rec { buildInputs = [ libjpeg - libtirpc szip zlib + ] ++ stdenv.lib.optionals uselibtirpc [ + libtirpc ]; - preConfigure = '' + preConfigure = stdenv.lib.optionalString uselibtirpc '' # Make tirpc discovery work with CMAKE_PREFIX_PATH substituteInPlace config/cmake/FindXDR.cmake \ --replace 'find_path(XDR_INCLUDE_DIR NAMES rpc/types.h PATHS "/usr/include" "/usr/include/tirpc")' \ |