@@ -1,5 +1,5 @@
11{ lib, stdenv, fetchFromGitHub, flex, bison, pkg-config, zlib, libtiff, libpng, fftw
2−, cairo, readline, ffmpeg, makeWrapper, wxGTK30, netcdf, blas
2+, cairo, readline, ffmpeg, makeWrapper, wxGTK30, wxmac, netcdf, blas
33, proj, gdal, geos, sqlite, postgresql, libmysqlclient, python3Packages, libLAS, proj-datumgrid
44, zstd, pdal, wrapGAppsHook
55}:
@@ -16,10 +16,14 @@ stdenv.mkDerivation rec {
1616 };
1717
1818 nativeBuildInputs = [ pkg-config ];
19− buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite cairo
20− readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql libmysqlclient blas
21− libLAS proj-datumgrid zstd pdal wrapGAppsHook ]
22− ++ (with python3Packages; [ python python-dateutil wxPython_4_1 numpy ]);
19+ buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite
20+ readline ffmpeg makeWrapper netcdf geos postgresql libmysqlclient blas
21+ libLAS proj-datumgrid zstd wrapGAppsHook ]
22+ ++ lib.optionals stdenv.isLinux [ cairo pdal wxGTK30 ]
23+ ++ lib.optional stdenv.isDarwin wxmac
24+ ++ (with python3Packages; [ python python-dateutil numpy ]
25+ ++ lib.optional stdenv.isDarwin wxPython_4_0
26+ ++ lib.optional stdenv.isLinux wxPython_4_1);
2327
2428 # On Darwin the installer tries to symlink the help files into a system
2529 # directory
@@ -33,12 +37,11 @@ stdenv.mkDerivation rec {
3337 configureFlags = [
3438 "--with-proj-share=${proj}/share/proj"
3539 "--with-proj-includes=${proj.dev}/include"
36− "--with-proj-lib=${proj}/lib"
40+ "--with-proj-libs=${proj}/lib"
3741 "--without-opengl"
3842 "--with-readline"
3943 "--with-wxwidgets"
4044 "--with-netcdf"
41− "--with-pdal"
4245 "--with-geos"
4346 "--with-postgres"
4447 "--with-postgres-libs=${postgresql.lib}/lib/"
@@ -51,6 +54,12 @@ stdenv.mkDerivation rec {
5154 "--with-zstd"
5255 "--with-fftw"
5356 "--with-pthread"
57+ ] ++ lib.optionals stdenv.isLinux [
58+ "--with-pdal"
59+ ] ++ lib.optionals stdenv.isDarwin [
60+ "--without-cairo"
61+ "--without-freetype"
62+ "--without-x"
5463 ];
5564
5665 # Otherwise a very confusing "Can't load GDAL library" error