2021-01-25 09:26:54 +01:00
|
|
|
{
|
|
|
|
lib,
|
2018-10-29 13:23:44 -04:00
|
|
|
buildPythonPackage,
|
2019-04-27 23:25:33 +01:00
|
|
|
fetchFromGitHub,
|
2022-07-16 12:58:59 +02:00
|
|
|
basemap-data,
|
|
|
|
cython,
|
|
|
|
geos,
|
2018-10-29 13:23:44 -04:00
|
|
|
numpy,
|
|
|
|
matplotlib,
|
|
|
|
pillow,
|
2019-04-27 23:25:33 +01:00
|
|
|
pyproj,
|
|
|
|
pyshp,
|
2022-07-16 12:58:59 +02:00
|
|
|
python,
|
|
|
|
setuptools,
|
2018-10-29 13:23:44 -04:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "basemap";
|
2024-02-18 11:36:42 +00:00
|
|
|
version = "1.4.1";
|
2023-12-07 16:53:02 +13:00
|
|
|
format = "setuptools";
|
2018-10-29 13:23:44 -04:00
|
|
|
|
2019-04-27 23:25:33 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matplotlib";
|
|
|
|
repo = "basemap";
|
2025-01-03 21:24:13 +01:00
|
|
|
tag = "v${version}";
|
2024-02-18 11:36:42 +00:00
|
|
|
hash = "sha256-0rTGsphwLy2yGvhO7bcmFqdgysIXXkDBmURwRVw3ZHY=";
|
2018-10-29 13:23:44 -04:00
|
|
|
};
|
|
|
|
|
2023-07-25 13:27:31 +00:00
|
|
|
sourceRoot = "${src.name}/packages/basemap";
|
2022-07-16 12:58:59 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
geos
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-03-17 14:01:43 -07:00
|
|
|
pythonRelaxDeps = true;
|
|
|
|
|
2022-07-16 12:58:59 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
basemap-data
|
|
|
|
numpy
|
|
|
|
matplotlib
|
|
|
|
pillow # undocumented optional dependency
|
|
|
|
pyproj
|
|
|
|
pyshp
|
|
|
|
];
|
2018-10-29 13:23:44 -04:00
|
|
|
|
|
|
|
# Standard configurePhase from `buildPythonPackage` seems to break the setup.py script
|
2022-07-16 12:58:59 +02:00
|
|
|
preBuild = ''
|
|
|
|
export GEOS_DIR=${geos}
|
2018-10-29 13:23:44 -04:00
|
|
|
'';
|
|
|
|
|
2022-07-16 12:58:59 +02:00
|
|
|
# test have various problems including requiring internet connection, permissions issues, problems with latest version of pillow
|
2018-10-29 13:23:44 -04:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-07-16 12:58:59 +02:00
|
|
|
checkPhase = ''
|
|
|
|
cd ../../examples
|
|
|
|
export HOME=$TEMPDIR
|
|
|
|
${python.interpreter} run_all.py
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-10-29 13:23:44 -04: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-28 16:44:11 +02:00
|
|
|
maintainers = [ ];
|
2022-07-16 12:58:59 +02:00
|
|
|
license = with licenses; [
|
|
|
|
mit
|
|
|
|
lgpl21
|
|
|
|
];
|
2018-10-29 13:23:44 -04:00
|
|
|
};
|
|
|
|
}
|