From b1857daa254354ee3f71e70f8b1bb609611e701c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Kemetm=C3=BCller?= Date: Sun, 30 Sep 2018 13:44:41 +0200 Subject: [PATCH 1/2] mapnik: 3.0.13 -> 3.0.20 --- pkgs/development/libraries/mapnik/default.nix | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/mapnik/default.nix b/pkgs/development/libraries/mapnik/default.nix index 0546bdc6359b..ebae2a6c3be0 100644 --- a/pkgs/development/libraries/mapnik/default.nix +++ b/pkgs/development/libraries/mapnik/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchzip, fetchpatch , boost, cairo, freetype, gdal, harfbuzz, icu, libjpeg, libpng, libtiff -, libwebp, libxml2, proj, python2, scons, sqlite, zlib +, libwebp, libxml2, proj, python, scons, sqlite, zlib # supply a postgresql package to enable the PostGIS input plugin , postgresql ? null @@ -8,28 +8,22 @@ stdenv.mkDerivation rec { name = "mapnik-${version}"; - version = "3.0.13"; + version = "3.0.20"; src = fetchzip { # this one contains all git submodules and is cheaper than fetchgit url = "https://github.com/mapnik/mapnik/releases/download/v${version}/mapnik-v${version}.tar.bz2"; - sha256 = "189wsd6l6awblkiha666l1sdyp7ifmnfsa87y0j37rvym6w4r065"; + sha256 = "05a2hvvk5s4x3wjvh4spd717vd5ri7h0sql7aarpi9jpc5h6xicc"; }; - patches = [(fetchpatch { - name = "icu-59.diff"; - url = https://github.com/mapnik/mapnik/commit/9e58c890430d.diff; - sha256 = "0h546qq8g19gw9s4979hla9vkq5kcwh3q45ryajyjhmlr2z9fi6p"; - })]; - # a distinct dev output makes python-mapnik fail outputs = [ "out" ]; - nativeBuildInputs = [ python2 scons ]; + nativeBuildInputs = [ python scons ]; buildInputs = [ boost cairo freetype gdal harfbuzz icu libjpeg libpng libtiff - libwebp libxml2 proj python2 sqlite zlib + libwebp libxml2 proj python sqlite zlib # optional inputs postgresql From be6451e0205ecf779986128b0f7e0171cb64803a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Kemetm=C3=BCller?= Date: Sun, 30 Sep 2018 13:46:18 +0200 Subject: [PATCH 2/2] pythonPackages.python-mapnik: Fix build 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. --- pkgs/top-level/python-packages.nix | 32 ++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 157f45f3f2a9..758f84c1a099 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3345,19 +3345,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; {