2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-04-13 19:44:15 +00:00
|
|
|
, pythonAtLeast
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
|
|
|
, matplotlib
|
|
|
|
, pillow
|
|
|
|
, setuptools
|
|
|
|
, pyproj
|
|
|
|
, pyshp
|
|
|
|
, six
|
|
|
|
, pkgs
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "basemap";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matplotlib";
|
|
|
|
repo = "basemap";
|
2022-02-10 20:34:41 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0nwpd6zx2q2fc556ppz71ra6ad9z0d5bz8hcld64i91dcy0f0zs3";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ numpy matplotlib pillow pyproj pyshp six ];
|
|
|
|
buildInputs = [ setuptools pkgs.geos ];
|
|
|
|
|
|
|
|
# Standard configurePhase from `buildPythonPackage` seems to break the setup.py script
|
|
|
|
configurePhase = ''
|
|
|
|
export GEOS_DIR=${pkgs.geos}
|
|
|
|
'';
|
|
|
|
|
|
|
|
# The 'check' target is not supported by the `setup.py` script.
|
|
|
|
# TODO : do the post install checks (`cd examples && ${python.interpreter} run_all.py`)
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://matplotlib.org/basemap/";
|
|
|
|
description = "Plot data on map projections with matplotlib";
|
|
|
|
longDescription = ''
|
|
|
|
An add-on toolkit for matplotlib that lets you plot data on map projections with
|
|
|
|
coastlines, lakes, rivers and political boundaries. See
|
|
|
|
http://matplotlib.github.com/basemap/users/examples.html for examples of what it can do.
|
|
|
|
'';
|
|
|
|
license = with licenses; [ mit gpl2 ];
|
2021-04-13 19:44:15 +00:00
|
|
|
broken = pythonAtLeast "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|