2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2018-10-16 04:48:51 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, isPyPy
|
|
|
|
, python
|
|
|
|
, pkgs
|
|
|
|
, pillow
|
|
|
|
, pycairo
|
|
|
|
}:
|
|
|
|
|
2019-03-21 11:35:29 +00:00
|
|
|
let
|
|
|
|
boost = pkgs.boost.override {
|
|
|
|
enablePython = true;
|
|
|
|
inherit python;
|
|
|
|
};
|
|
|
|
mapnik = pkgs.mapnik.override {
|
|
|
|
inherit python boost;
|
|
|
|
};
|
|
|
|
|
|
|
|
in buildPythonPackage rec {
|
2018-10-16 04:48:51 +01:00
|
|
|
pname = "python-mapnik";
|
2020-03-03 14:08:17 +00:00
|
|
|
version = "unstable-2020-02-24";
|
2018-10-16 04:48:51 +01:00
|
|
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "mapnik";
|
|
|
|
repo = "python-mapnik";
|
2020-03-03 14:08:17 +00:00
|
|
|
rev = "7da019cf9eb12af8f8aa88b7d75789dfcd1e901b";
|
|
|
|
sha256 = "0snn7q7w1ab90311q8wgd1z64kw1svm5w831q0xd6glqhah86qc8";
|
2018-10-16 04:48:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
disabled = isPyPy;
|
|
|
|
doCheck = false; # doesn't find needed test data files
|
|
|
|
preBuild = let
|
2021-01-24 00:29:22 +00:00
|
|
|
pythonVersion = with lib.versions; "${major python.version}${minor python.version}";
|
2018-10-16 04:48:51 +01:00
|
|
|
in ''
|
|
|
|
export BOOST_PYTHON_LIB="boost_python${pythonVersion}"
|
|
|
|
export BOOST_THREAD_LIB="boost_thread"
|
|
|
|
export BOOST_SYSTEM_LIB="boost_system"
|
|
|
|
'';
|
2019-03-21 11:35:29 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
mapnik # for mapnik_config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
mapnik
|
|
|
|
boost
|
|
|
|
] ++ (with pkgs; [
|
|
|
|
cairo
|
|
|
|
harfbuzz
|
|
|
|
icu
|
|
|
|
libjpeg
|
|
|
|
libpng
|
|
|
|
libtiff
|
|
|
|
libwebp
|
|
|
|
proj
|
|
|
|
zlib
|
|
|
|
]);
|
2018-10-16 04:48:51 +01:00
|
|
|
propagatedBuildInputs = [ pillow pycairo ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-16 04:48:51 +01:00
|
|
|
description = "Python bindings for Mapnik";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://mapnik.org";
|
2018-10-16 04:48:51 +01:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|