mapnik: modernize

This commit is contained in:
Nikolay Korotkiy 2025-06-07 23:28:16 +04:00
parent 1fd239539f
commit 5532e97e51
No known key found for this signature in database
GPG key ID: D1DE6D7F693663A5

View file

@ -27,14 +27,14 @@
sparsehash, sparsehash,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "mapnik"; pname = "mapnik";
version = "4.1.0"; version = "4.1.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mapnik"; owner = "mapnik";
repo = "mapnik"; repo = "mapnik";
rev = "v${version}"; tag = "v${finalAttrs.version}";
hash = "sha256-EhRMG0xPOGwcRAMQD2B4z7nVlXQf4HFFfL3oUaUfXBY="; hash = "sha256-EhRMG0xPOGwcRAMQD2B4z7nVlXQf4HFFfL3oUaUfXBY=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
@ -47,6 +47,8 @@ stdenv.mkDerivation rec {
rm -r scons rm -r scons
# Remove bundled 'sparsehash' directory in favor of 'sparsehash' package # Remove bundled 'sparsehash' directory in favor of 'sparsehash' package
rm -r deps/mapnik/sparsehash rm -r deps/mapnik/sparsehash
# Remove bundled 'protozero' directory in favor of 'protozero' package
rm -r deps/mapbox/protozero
''; '';
# a distinct dev output makes python-mapnik fail # a distinct dev output makes python-mapnik fail
@ -118,19 +120,19 @@ stdenv.mkDerivation rec {
''; '';
preInstall = '' preInstall = ''
mkdir -p $out/bin install -Dm755 ../utils/mapnik-config/mapnik-config -t $out/bin
cp ../utils/mapnik-config/mapnik-config $out/bin/mapnik-config
''; '';
meta = with lib; { meta = {
description = "Open source toolkit for developing mapping applications"; description = "Open source toolkit for developing mapping applications";
homepage = "https://mapnik.org"; homepage = "https://mapnik.org";
maintainers = with maintainers; [ changelog = "https://github.com/mapnik/mapnik/blob/${finalAttrs.src.tag}/CHANGELOG.md";
maintainers = with lib.maintainers; [
hrdinka hrdinka
hummeltech hummeltech
]; ];
teams = [ teams.geospatial ]; teams = [ lib.teams.geospatial ];
license = licenses.lgpl21Plus; license = lib.licenses.lgpl21Plus;
platforms = platforms.all; platforms = lib.platforms.all;
}; };
} })