2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchzip
|
2015-12-02 20:27:32 +00:00
|
|
|
, boost, cairo, freetype, gdal, harfbuzz, icu, libjpeg, libpng, libtiff
|
2019-06-16 20:59:06 +01:00
|
|
|
, libwebp, libxml2, proj, python, sqlite, zlib
|
2017-04-20 19:31:37 +01:00
|
|
|
|
|
|
|
# supply a postgresql package to enable the PostGIS input plugin
|
|
|
|
, postgresql ? null
|
2015-12-02 20:27:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "mapnik";
|
2021-01-20 07:19:03 +00:00
|
|
|
version = "3.1.0";
|
2015-12-02 20:27:32 +00:00
|
|
|
|
2016-09-27 14:17:28 +01: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";
|
2021-01-20 07:19:03 +00:00
|
|
|
sha256 = "sha256-qqPqN4vs3ZsqKgnx21yQhX8OzHca/0O+3mvQ/vnC5EY=";
|
2015-12-02 20:27:32 +00:00
|
|
|
};
|
|
|
|
|
2016-09-27 14:17:28 +01:00
|
|
|
# a distinct dev output makes python-mapnik fail
|
|
|
|
outputs = [ "out" ];
|
2016-06-13 10:59:04 +01:00
|
|
|
|
2018-11-14 20:00:19 +00:00
|
|
|
nativeBuildInputs = [ python ];
|
2015-12-02 20:27:32 +00:00
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
[ boost cairo freetype gdal harfbuzz icu libjpeg libpng libtiff
|
2018-09-30 12:44:41 +01:00
|
|
|
libwebp libxml2 proj python sqlite zlib
|
2017-04-20 19:31:37 +01:00
|
|
|
|
|
|
|
# optional inputs
|
|
|
|
postgresql
|
2015-12-02 20:27:32 +00:00
|
|
|
];
|
|
|
|
|
2018-11-12 02:52:07 +00:00
|
|
|
prefixKey = "PREFIX=";
|
2015-12-02 20:27:32 +00:00
|
|
|
|
2019-03-04 20:41:53 +00:00
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs ./configure
|
|
|
|
'';
|
|
|
|
|
2018-11-14 20:00:19 +00:00
|
|
|
configureFlags = [
|
2018-11-12 02:52:07 +00:00
|
|
|
"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 20:27:32 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2015-12-02 20:27:32 +00:00
|
|
|
description = "An open source toolkit for developing mapping applications";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://mapnik.org";
|
2015-12-02 20:27:32 +00:00
|
|
|
maintainers = with maintainers; [ hrdinka ];
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|