Skip to content

Commit

Permalink
pythonPackages.python-mapnik: Fix build
Browse files Browse the repository at this point in the history
There were two things to fix:
- Boost started shipping libboost_python.so as libboost_python{Major}{Minor}
- Make sure that mapnik and boost link to the correct version of python.

(cherry picked from commit be6451e)
  • Loading branch information
knedlsepp authored and xeji committed Sep 30, 2018
1 parent 8b3bff1 commit f2a1d99
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -3374,19 +3374,43 @@ in {

python-mapnik = buildPythonPackage rec {
name = "python-mapnik-${version}";
version = "3.0.13";
version = "3.0.16";

src = pkgs.fetchFromGitHub {
owner = "mapnik";
repo = "python-mapnik";
rev = "v${version}";
sha256 = "0biw9bfkbsgfyjihyvkj4abx9s9r3h81rk6dc1y32022rypsqhkp";
sha256 = "1gqs4kvmjawdgl80j0ab5r8y0va9kw0rvwix3093xsv4hwd00lcc";
};

disabled = isPyPy;
doCheck = false; # doesn't find needed test data files
buildInputs = with pkgs;
[ boost cairo harfbuzz icu libjpeg libpng libtiff libwebp mapnik proj zlib ];
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 = with self; [ pillow pycairo ];

meta = with stdenv.lib; {
Expand Down

0 comments on commit f2a1d99

Please sign in to comment.