2018-10-29 17:23:44 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
2019-04-27 23:25:33 +01:00
|
|
|
, fetchFromGitHub
|
2018-10-29 17:23:44 +00:00
|
|
|
, numpy
|
|
|
|
, matplotlib
|
|
|
|
, pillow
|
|
|
|
, setuptools
|
2019-04-27 23:25:33 +01:00
|
|
|
, pyproj
|
|
|
|
, pyshp
|
|
|
|
, six
|
2018-10-29 17:23:44 +00:00
|
|
|
, pkgs
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "basemap";
|
2019-09-28 10:56:47 +01:00
|
|
|
version = "1.2.1";
|
2018-10-29 17:23:44 +00:00
|
|
|
|
2019-04-27 23:25:33 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matplotlib";
|
|
|
|
repo = "basemap";
|
|
|
|
rev = "v${version}rel";
|
2019-09-28 10:56:47 +01:00
|
|
|
sha256 = "13lw1iwa8hadpvqdgb06nh881l8c17awzvvwbfwblvb9q9s0lnzp";
|
2018-10-29 17:23:44 +00:00
|
|
|
};
|
|
|
|
|
2019-04-27 23:25:33 +01:00
|
|
|
propagatedBuildInputs = [ numpy matplotlib pillow pyproj pyshp six ];
|
|
|
|
buildInputs = [ setuptools pkgs.geos ];
|
2018-10-29 17:23:44 +00:00
|
|
|
|
|
|
|
# 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;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|