summary refs log tree commit diff
path: root/pkgs/development/python-modules/python-mapnik/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/python-mapnik/default.nix')
-rw-r--r--pkgs/development/python-modules/python-mapnik/default.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/python-mapnik/default.nix b/pkgs/development/python-modules/python-mapnik/default.nix
index 61cd5e34855..228e0d74ebc 100644
--- a/pkgs/development/python-modules/python-mapnik/default.nix
+++ b/pkgs/development/python-modules/python-mapnik/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib
 , buildPythonPackage
 , isPyPy
 , python
@@ -30,15 +30,21 @@ in buildPythonPackage rec {
   disabled = isPyPy;
   doCheck = false; # doesn't find needed test data files
   preBuild = let
-    pythonVersion = with stdenv.lib.versions; "${major python.version}${minor python.version}";
+    pythonVersion = with 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"
+    export PYCAIRO=true
   '';
 
   nativeBuildInputs = [
     mapnik # for mapnik_config
+    pkgs.pkgconfig
+  ];
+
+  patches = [
+    ./find-pycairo-with-pkg-config.patch
   ];
 
   buildInputs = [
@@ -57,7 +63,9 @@ in buildPythonPackage rec {
   ]);
   propagatedBuildInputs = [ pillow pycairo ];
 
-  meta = with stdenv.lib; {
+  pythonImportsCheck = [ "mapnik" ] ;
+
+  meta = with lib; {
     description = "Python bindings for Mapnik";
     homepage = "https://mapnik.org";
     license  = licenses.lgpl21;