2016-09-27 15:17:28 +02:00
|
|
|
{ stdenv, fetchzip
|
2015-12-02 21:27:32 +01:00
|
|
|
, boost, cairo, freetype, gdal, harfbuzz, icu, libjpeg, libpng, libtiff
|
2017-02-08 19:51:11 +01:00
|
|
|
, libwebp, libxml2, proj, python2, scons, sqlite, zlib
|
2015-12-02 21:27:32 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "mapnik-${version}";
|
2016-09-27 15:17:28 +02:00
|
|
|
version = "3.0.12";
|
2015-12-02 21:27:32 +01:00
|
|
|
|
2016-09-27 15:17:28 +02:00
|
|
|
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 = "02w360fxk0pfkk0zbwc134jq7rkkib58scs5k67j8np6fx6gag6i";
|
2015-12-02 21:27:32 +01:00
|
|
|
};
|
|
|
|
|
2016-09-27 15:17:28 +02:00
|
|
|
# a distinct dev output makes python-mapnik fail
|
|
|
|
outputs = [ "out" ];
|
2016-06-13 11:59:04 +02:00
|
|
|
|
2017-02-08 19:51:11 +01:00
|
|
|
nativeBuildInputs = [ python2 scons ];
|
2015-12-02 21:27:32 +01:00
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
[ boost cairo freetype gdal harfbuzz icu libjpeg libpng libtiff
|
2017-02-08 19:51:11 +01:00
|
|
|
libwebp libxml2 proj python2 sqlite zlib
|
2015-12-02 21:27:32 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
configurePhase = ''
|
2016-11-13 13:18:39 +01:00
|
|
|
scons configure PREFIX="$out" BOOST_INCLUDES="${boost.dev}/include" \
|
|
|
|
BOOST_LIBS="${boost.out}/lib" \
|
|
|
|
CAIRO_INCLUDES="${cairo.dev}/include" \
|
|
|
|
CAIRO_LIBS="${cairo.out}/lib" \
|
|
|
|
FREETYPE_INCLUDES="${freetype.dev}/include" \
|
|
|
|
FREETYPE_LIBS="${freetype.out}/lib" \
|
|
|
|
GDAL_CONFIG="${gdal}/bin/gdal-config" \
|
|
|
|
HB_INCLUDES="${harfbuzz.dev}/include" \
|
|
|
|
HB_LIBS="${harfbuzz.out}/lib" \
|
|
|
|
ICU_INCLUDES="${icu.dev}/include" \
|
|
|
|
ICU_LIBS="${icu.out}/lib" \
|
|
|
|
JPEG_INCLUDES="${libjpeg.dev}/include" \
|
|
|
|
JPEG_LIBS="${libjpeg.out}/lib" \
|
|
|
|
PNG_INCLUDES="${libpng.dev}/include" \
|
|
|
|
PNG_LIBS="${libpng.out}/lib" \
|
|
|
|
PROJ_INCLUDES="${proj}/include" \
|
|
|
|
PROJ_LIBS="${proj}/lib" \
|
|
|
|
SQLITE_INCLUDES="${sqlite.dev}/include" \
|
|
|
|
SQLITE_LIBS="${sqlite.out}/lib" \
|
|
|
|
TIFF_INCLUDES="${libtiff.dev}/include" \
|
|
|
|
TIFF_LIBS="${libtiff.out}/lib" \
|
|
|
|
WEBP_INCLUDES="${libwebp}/include" \
|
|
|
|
WEBP_LIBS="${libwebp}/lib" \
|
|
|
|
XML2_INCLUDES="${libxml2.dev}/include" \
|
|
|
|
XML2_LIBS="${libxml2.out}/lib"
|
2015-12-02 21:27:32 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = false;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out"
|
|
|
|
scons install
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "An open source toolkit for developing mapping applications";
|
|
|
|
homepage = http://mapnik.org;
|
|
|
|
maintainers = with maintainers; [ hrdinka ];
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|