From 2d8434d90b78ad788ce138f802139a14663c2160 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Wed, 18 Mar 2015 23:04:34 +0100 Subject: [PATCH] Add python basemap package --- pkgs/top-level/python-packages.nix | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bcce660ad3c..addb3ff92a5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14007,4 +14007,41 @@ let }; }; + basemap = buildPythonPackage rec { + name = "basemap-1.0.7"; + + src = pkgs.fetchurl { + url = "mirror://sourceforge/project/matplotlib/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz"; + sha256 = "0ca522zirj5sj10vg3fshlmgi615zy5gw2assapcj91vsvhc4zp0"; + }; + + propagatedBuildInputs = with self; [ numpy matplotlib pillow ]; + buildInputs = with self; with pkgs ; [ setuptools geos proj ]; + + # Standard configurePhase from `buildPythonPackage` seems to break the setup.py script + configurePhase = '' + export GEOS_DIR=${pkgs.geos} + ''; + + # The installer does not support the '--old-and-unmanageable' option + installPhase = '' + ${python.interpreter} setup.py install --prefix $out + ''; + + # 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 = { + homepage = "http://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. + ''; + licences = [ licenses.mit licenses.gpl2 ]; + }; + }; + }); in pythonPackages