2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
basemap-data,
|
|
|
|
cython,
|
|
|
|
geos,
|
|
|
|
numpy,
|
|
|
|
matplotlib,
|
|
|
|
pillow,
|
|
|
|
pyproj,
|
|
|
|
pyshp,
|
|
|
|
python,
|
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "basemap";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.4.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
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}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-0rTGsphwLy2yGvhO7bcmFqdgysIXXkDBmURwRVw3ZHY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/packages/basemap";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
geos
|
|
|
|
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.
|
|
|
|
'';
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
mit
|
|
|
|
lgpl21
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|