about summary refs log tree commit diff
path: root/pkgs/development/libraries/pdal
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2022-10-12 21:02:43 +0200
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2022-10-12 21:02:43 +0200
commitfcf02643f40cfc65219b767f987778291cb270db (patch)
treebb9d26e0b9fc0c728385f71cc417211b7164cb5e /pkgs/development/libraries/pdal
parent9a8d7bbfd104b3bff448ec0f4eae5b200d167a72 (diff)
pdal: fix build on darwin
Diffstat (limited to 'pkgs/development/libraries/pdal')
-rw-r--r--pkgs/development/libraries/pdal/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/development/libraries/pdal/default.nix b/pkgs/development/libraries/pdal/default.nix
index 354c68decfb07..7e903a3d6b8b1 100644
--- a/pkgs/development/libraries/pdal/default.nix
+++ b/pkgs/development/libraries/pdal/default.nix
@@ -8,6 +8,7 @@
 , gdal
 , hdf5-cpp
 , LASzip
+, enableE57 ? lib.meta.availableOn stdenv.hostPlatform libe57format
 , libe57format
 , libgeotiff
 , libxml2
@@ -40,7 +41,6 @@ stdenv.mkDerivation rec {
     gdal
     hdf5-cpp
     LASzip
-    libe57format
     libgeotiff
     libxml2
     postgresql
@@ -48,10 +48,12 @@ stdenv.mkDerivation rec {
     xercesc
     zlib
     zstd
+  ] ++ lib.optionals enableE57 [
+    libe57format
   ];
 
   cmakeFlags = [
-    "-DBUILD_PLUGIN_E57=ON"
+    "-DBUILD_PLUGIN_E57=${if enableE57 then "ON" else "OFF"}"
     "-DBUILD_PLUGIN_HDF=ON"
     "-DBUILD_PLUGIN_PGPOINTCLOUD=ON"
     "-DBUILD_PLUGIN_TILEDB=ON"