1{ stdenv
2, buildPythonPackage
3, fetchurl
4, numpy
5, matplotlib
6, pillow
7, setuptools
8, pkgs
9}:
10
11buildPythonPackage rec {
12 pname = "basemap";
13 version = "1.0.7";
14
15 src = fetchurl {
16 url = "mirror://sourceforge/project/matplotlib/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz";
17 sha256 = "0ca522zirj5sj10vg3fshlmgi615zy5gw2assapcj91vsvhc4zp0";
18 };
19
20 propagatedBuildInputs = [ numpy matplotlib pillow ];
21 buildInputs = [ setuptools pkgs.geos pkgs.proj ];
22
23 # Standard configurePhase from `buildPythonPackage` seems to break the setup.py script
24 configurePhase = ''
25 export GEOS_DIR=${pkgs.geos}
26 '';
27
28 # The 'check' target is not supported by the `setup.py` script.
29 # TODO : do the post install checks (`cd examples && ${python.interpreter} run_all.py`)
30 doCheck = false;
31
32 meta = with stdenv.lib; {
33 homepage = "https://matplotlib.org/basemap/";
34 description = "Plot data on map projections with matplotlib";
35 longDescription = ''
36 An add-on toolkit for matplotlib that lets you plot data on map projections with
37 coastlines, lakes, rivers and political boundaries. See
38 http://matplotlib.github.com/basemap/users/examples.html for examples of what it can do.
39 '';
40 license = with licenses; [ mit gpl2 ];
41 };
42
43}