From 5532e97e51da15f4f440907c7080735f417dad0f Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 7 Jun 2025 23:28:16 +0400 Subject: [PATCH] mapnik: modernize --- pkgs/development/libraries/mapnik/default.nix | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/mapnik/default.nix b/pkgs/development/libraries/mapnik/default.nix index 358903ba9761..f6e1270402f3 100644 --- a/pkgs/development/libraries/mapnik/default.nix +++ b/pkgs/development/libraries/mapnik/default.nix @@ -27,14 +27,14 @@ sparsehash, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "mapnik"; version = "4.1.0"; src = fetchFromGitHub { owner = "mapnik"; repo = "mapnik"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-EhRMG0xPOGwcRAMQD2B4z7nVlXQf4HFFfL3oUaUfXBY="; fetchSubmodules = true; }; @@ -47,6 +47,8 @@ stdenv.mkDerivation rec { rm -r scons # Remove bundled 'sparsehash' directory in favor of 'sparsehash' package 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 @@ -118,19 +120,19 @@ stdenv.mkDerivation rec { ''; preInstall = '' - mkdir -p $out/bin - cp ../utils/mapnik-config/mapnik-config $out/bin/mapnik-config + install -Dm755 ../utils/mapnik-config/mapnik-config -t $out/bin ''; - meta = with lib; { + meta = { description = "Open source toolkit for developing mapping applications"; homepage = "https://mapnik.org"; - maintainers = with maintainers; [ + changelog = "https://github.com/mapnik/mapnik/blob/${finalAttrs.src.tag}/CHANGELOG.md"; + maintainers = with lib.maintainers; [ hrdinka hummeltech ]; - teams = [ teams.geospatial ]; - license = licenses.lgpl21Plus; - platforms = platforms.all; + teams = [ lib.teams.geospatial ]; + license = lib.licenses.lgpl21Plus; + platforms = lib.platforms.all; }; -} +})