summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-mapnik
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-11-08 11:28:53 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-11-08 11:28:53 -0500
commitebd1dd54e56d21d54bbfe2731426b9fd75ca122c (patch)
tree322f663411fe0869554c065523f6ff8753d7db9e /pkgs/development/python-modules/python-mapnik
parent2a1c0dde8f70ae4cdfa22ea82ad7be7b739fe061 (diff)
parent57cb7663869b900d07f1f20b3cbd42b30c19db8c (diff)
Merge remote-tracking branch 'upstream/master' into haskell-bash-completion-2
Diffstat (limited to 'pkgs/development/python-modules/python-mapnik')
-rw-r--r--pkgs/development/python-modules/python-mapnik/default.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-mapnik/default.nix b/pkgs/development/python-modules/python-mapnik/default.nix
new file mode 100644
index 000000000000..692bbe4bcd89
--- /dev/null
+++ b/pkgs/development/python-modules/python-mapnik/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, buildPythonPackage
+, fetchFromGitHub
+, isPyPy
+, python
+, pkgs
+, pillow
+, pycairo
+}:
+
+buildPythonPackage rec {
+ pname = "python-mapnik";
+ version = "3.0.16";
+
+ src = pkgs.fetchFromGitHub {
+ owner = "mapnik";
+ repo = "python-mapnik";
+ rev = "v${version}";
+ sha256 = "1gqs4kvmjawdgl80j0ab5r8y0va9kw0rvwix3093xsv4hwd00lcc";
+ };
+
+ disabled = isPyPy;
+ doCheck = false; # doesn't find needed test data files
+ preBuild = let
+ pythonVersion = with stdenv.lib.versions; "${major python.version}${minor python.version}";
+ in ''
+ export BOOST_PYTHON_LIB="boost_python${pythonVersion}"
+ export BOOST_THREAD_LIB="boost_thread"
+ export BOOST_SYSTEM_LIB="boost_system"
+ '';
+ buildInputs = with pkgs; [
+ (boost.override {
+ enablePython = true;
+ inherit python;
+ })
+ (mapnik.override {
+ inherit python;
+ boost = (boost.override { enablePython = true; inherit python; });
+ })
+ cairo
+ harfbuzz
+ icu
+ libjpeg
+ libpng
+ libtiff
+ libwebp
+ proj
+ zlib
+ ];
+ propagatedBuildInputs = [ pillow pycairo ];
+
+ meta = with stdenv.lib; {
+ description = "Python bindings for Mapnik";
+ homepage = http://mapnik.org;
+ license = licenses.lgpl21;
+ };
+
+}