anchor.diff:    };
   
     nativeBuildInputs = [ pkg-config ];
  -  buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite cairo
  -  readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql libmysqlclient blas
  -  libLAS proj-datumgrid zstd pdal wrapGAppsHook ]
  -    ++ (with python3Packages; [ python python-dateutil wxPython_4_1 numpy ]);
  +  buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite
  +  readline ffmpeg makeWrapper netcdf geos postgresql libmysqlclient blas
  +  libLAS proj-datumgrid zstd wrapGAppsHook ]
  +    ++ lib.optionals stdenv.isLinux [ cairo pdal wxGTK30 ]
  +    ++ lib.optional stdenv.isDarwin wxmac
  +    ++ (with python3Packages; [ python python-dateutil numpy ]
  +      ++ lib.optional stdenv.isDarwin wxPython_4_0
  +      ++ lib.optional stdenv.isLinux wxPython_4_1);
   
     # On Darwin the installer tries to symlink the help files into a system
     # directory
  
positive.code:   configureFlags = [
      "--with-proj-share=${proj}/share/proj"
      "--with-proj-includes=${proj.dev}/include"
      "--with-proj-lib=${proj}/lib"
      "--without-opengl"
      "--with-readline"
      "--with-wxwidgets"
      "--with-netcdf"
      "--with-pdal"
      "--with-geos"
      "--with-postgres"
      "--with-postgres-libs=${postgresql.lib}/lib/"
  
negative.code:     "--with-zstd"
      "--with-fftw"
      "--with-pthread"
    ] ++ lib.optionals stdenv.isLinux [
      "--with-pdal"
    ] ++ lib.optionals stdenv.isDarwin [
      "--without-cairo"
      "--without-freetype"
      "--without-x"
    ];
  
    # Otherwise a very confusing "Can't load GDAL library" error
  