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
|
2022-08-12 12:06:08 +00:00
|
|
|
, basemap-data
|
|
|
|
, cython
|
|
|
|
, geos
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
|
|
|
, matplotlib
|
|
|
|
, pillow
|
|
|
|
, pyproj
|
|
|
|
, pyshp
|
2022-08-12 12:06:08 +00:00
|
|
|
, python
|
2023-03-24 00:07:29 +00:00
|
|
|
, pythonRelaxDepsHook
|
2022-08-12 12:06:08 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "basemap";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matplotlib";
|
|
|
|
repo = "basemap";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
hash = "sha256-BSWifzh+Y1f+x89oNYMBvttWY9qZ0IM5QYqSgyVb1fE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
sourceRoot = "source/packages/basemap";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
geos
|
2023-03-24 00:07:29 +00:00
|
|
|
pythonRelaxDepsHook
|
2022-08-12 12:06:08 +00:00
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
pythonRelaxDeps = true;
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
basemap-data
|
|
|
|
numpy
|
|
|
|
matplotlib
|
|
|
|
pillow # undocumented optional dependency
|
|
|
|
pyproj
|
|
|
|
pyshp
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Standard configurePhase from `buildPythonPackage` seems to break the setup.py script
|
2022-08-12 12:06:08 +00:00
|
|
|
preBuild = ''
|
|
|
|
export GEOS_DIR=${geos}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
# test have various problems including requiring internet connection, permissions issues, problems with latest version of pillow
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
checkPhase = ''
|
|
|
|
cd ../../examples
|
|
|
|
export HOME=$TEMPDIR
|
|
|
|
${python.interpreter} run_all.py
|
|
|
|
'';
|
|
|
|
|
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.
|
|
|
|
'';
|
2022-08-12 12:06:08 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
license = with licenses; [ mit lgpl21 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|