at 23.05-pre 1.6 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonAtLeast 5, basemap-data 6, cython 7, geos 8, numpy 9, matplotlib 10, pillow 11, pyproj 12, pyshp 13, python 14, setuptools 15}: 16 17buildPythonPackage rec { 18 pname = "basemap"; 19 version = "1.3.6"; 20 21 src = fetchFromGitHub { 22 owner = "matplotlib"; 23 repo = "basemap"; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-BSWifzh+Y1f+x89oNYMBvttWY9qZ0IM5QYqSgyVb1fE="; 26 }; 27 28 sourceRoot = "source/packages/basemap"; 29 30 nativeBuildInputs = [ 31 cython 32 geos 33 setuptools 34 ]; 35 36 propagatedBuildInputs = [ 37 basemap-data 38 numpy 39 matplotlib 40 pillow # undocumented optional dependency 41 pyproj 42 pyshp 43 ]; 44 45 # Standard configurePhase from `buildPythonPackage` seems to break the setup.py script 46 preBuild = '' 47 export GEOS_DIR=${geos} 48 ''; 49 50 # test have various problems including requiring internet connection, permissions issues, problems with latest version of pillow 51 doCheck = false; 52 53 checkPhase = '' 54 cd ../../examples 55 export HOME=$TEMPDIR 56 ${python.interpreter} run_all.py 57 ''; 58 59 meta = with lib; { 60 homepage = "https://matplotlib.org/basemap/"; 61 description = "Plot data on map projections with matplotlib"; 62 longDescription = '' 63 An add-on toolkit for matplotlib that lets you plot data on map projections with 64 coastlines, lakes, rivers and political boundaries. See 65 http://matplotlib.github.com/basemap/users/examples.html for examples of what it can do. 66 ''; 67 maintainers = with maintainers; [ ]; 68 license = with licenses; [ mit lgpl21 ]; 69 }; 70}