anchor.diff:  { stdenv, fetchurl, fetchpatch, unzip, libjpeg, libtiff, zlib
   , postgresql, mysql, libgeotiff, pythonPackages, proj, geos, openssl
  -, libpng, sqlite, libspatialite, poppler, hdf4
  +, libpng, sqlite, libspatialite, poppler, hdf4, qhull, giflib
   , libiconv
   , netcdfSupport ? true, netcdf, hdf5 , curl
   }:
  
positive.code:     "--with-sqlite3=${sqlite.dev}"
      "--with-spatialite=${libspatialite}"
      "--with-python"               # optional
      "--with-static-proj4=${proj}" # optional
      "--with-geos=${geos}/bin/geos-config"# optional
      "--with-hdf4=${hdf4.dev}" # optional
      (if netcdfSupport then "--with-netcdf=${netcdf}" else "")
  
negative.code: with stdenv.lib;
  
  stdenv.mkDerivation rec {
    name = "gdal-${version}";
    version = "2.3.1";
  
    src = fetchurl {
      url = "https://download.osgeo.org/gdal/${version}/${name}.tar.xz";
      sha256 = "0nkjnznrp7dr41zsh8j923c9zpc3i5vj3wjfc2df9rrybb22ailw";
    };
  
    buildInputs = [ unzip libjpeg libtiff libpng proj openssl sqlite
      libspatialite poppler hdf4 qhull giflib ]
    ++ (with pythonPackages; [ python numpy wrapPython ])
    ++ stdenv.lib.optional stdenv.isDarwin libiconv
    ++ stdenv.lib.optionals netcdfSupport [ netcdf hdf5 curl ];
  