2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-08-05 21:33:18 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, isPyPy
|
|
|
|
, python
|
|
|
|
, pillow
|
|
|
|
, pycairo
|
2021-08-05 21:33:18 +00:00
|
|
|
, pkg-config
|
|
|
|
, boost
|
|
|
|
, cairo
|
|
|
|
, harfbuzz
|
|
|
|
, icu
|
|
|
|
, libjpeg
|
|
|
|
, libpng
|
|
|
|
, libtiff
|
|
|
|
, libwebp
|
|
|
|
, mapnik
|
|
|
|
, proj
|
|
|
|
, zlib
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "python-mapnik";
|
|
|
|
version = "unstable-2020-02-24";
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
src = fetchFromGitHub {
|
2020-04-24 23:36:52 +00:00
|
|
|
owner = "mapnik";
|
|
|
|
repo = "python-mapnik";
|
|
|
|
rev = "7da019cf9eb12af8f8aa88b7d75789dfcd1e901b";
|
|
|
|
sha256 = "0snn7q7w1ab90311q8wgd1z64kw1svm5w831q0xd6glqhah86qc8";
|
|
|
|
};
|
|
|
|
|
|
|
|
disabled = isPyPy;
|
|
|
|
doCheck = false; # doesn't find needed test data files
|
2021-08-05 21:33:18 +00:00
|
|
|
preBuild = ''
|
|
|
|
export BOOST_PYTHON_LIB="boost_python${"${lib.versions.major python.version}${lib.versions.minor python.version}"}"
|
2020-04-24 23:36:52 +00:00
|
|
|
export BOOST_THREAD_LIB="boost_thread"
|
|
|
|
export BOOST_SYSTEM_LIB="boost_system"
|
2021-05-20 23:08:51 +00:00
|
|
|
export PYCAIRO=true
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
mapnik # for mapnik_config
|
2021-08-05 21:33:18 +00:00
|
|
|
pkg-config
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./find-pycairo-with-pkg-config.patch
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
mapnik
|
|
|
|
boost
|
|
|
|
cairo
|
|
|
|
harfbuzz
|
|
|
|
icu
|
|
|
|
libjpeg
|
|
|
|
libpng
|
|
|
|
libtiff
|
|
|
|
libwebp
|
|
|
|
proj
|
|
|
|
zlib
|
2021-08-05 21:33:18 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ pillow pycairo ];
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
pythonImportsCheck = [ "mapnik" ];
|
2021-05-29 03:34:57 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python bindings for Mapnik";
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ erictapen ];
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://mapnik.org";
|
2021-08-05 21:33:18 +00:00
|
|
|
license = licenses.lgpl21;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|