4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
49 lines
1.3 KiB
Nix
49 lines
1.3 KiB
Nix
{ lib, stdenv
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, numpy
|
|
, matplotlib
|
|
, pillow
|
|
, setuptools
|
|
, pyproj
|
|
, pyshp
|
|
, six
|
|
, pkgs
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "basemap";
|
|
version = "1.2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "matplotlib";
|
|
repo = "basemap";
|
|
rev = "v${version}rel";
|
|
sha256 = "13lw1iwa8hadpvqdgb06nh881l8c17awzvvwbfwblvb9q9s0lnzp";
|
|
};
|
|
|
|
propagatedBuildInputs = [ numpy matplotlib pillow pyproj pyshp six ];
|
|
buildInputs = [ setuptools pkgs.geos ];
|
|
|
|
# Standard configurePhase from `buildPythonPackage` seems to break the setup.py script
|
|
configurePhase = ''
|
|
export GEOS_DIR=${pkgs.geos}
|
|
'';
|
|
|
|
# The 'check' target is not supported by the `setup.py` script.
|
|
# TODO : do the post install checks (`cd examples && ${python.interpreter} run_all.py`)
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
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.
|
|
'';
|
|
license = with licenses; [ mit gpl2 ];
|
|
};
|
|
|
|
}
|