-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mapnik: 3.1.0 -> unstable-2022-04-14 #146039
Conversation
Does diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ee2d656c8bc..7026b0da1a8 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -18490,7 +18490,14 @@ with pkgs;
opencl-clang = callPackage ../development/libraries/opencl-clang { };
- mapnik = callPackage ../development/libraries/mapnik { };
+ mapnik = callPackage ../development/libraries/mapnik {
+ gdal = gdal.override {
+ libgeotiff = libgeotiff.override { proj = proj_7; };
+ libspatialite = libspatialite.override { proj = proj_7; };
+ proj = proj_7;
+ };
+ proj = proj_7;
+ };
marisa = callPackage ../development/libraries/marisa {};
not do the trick? It might at least lead to problems when using other packages that depend on PROJ 8. |
@dotlambda Mh, sounds like an easy fix. python-mapnik builds with that. I guess my changes make sense whenever a new mapnik version comes out. Until then I'd try your fix. |
1bc9288
to
9d438be
Compare
- list(APPEND MAPNIK_OPTIONAL_LIBS HarfBuzz::HarfBuzz HarfBuzz::ICU) | ||
-endif() | ||
+pkg_check_modules(harfbuzz REQUIRED IMPORTED_TARGET harfbuzz) | ||
+list(APPEND MAPNIK_OPTIONAL_LIBS PkgConfig::harfbuzz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With mapnik/mapnik#4270 merged, you can pass CMAKE_DISABLE_FIND_PACKAGE_harfbuzz=OFF
to the configure call to disable find_packge(harfbuzz)
and force pkg-config therefore. So the patch can be removed after that.
See https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure (at the bottom of the section) for more info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's nice!
Any chance we'd get a new mapnik release anytime soon? Using master in Nixpkgs is usually only done for special cases, e.g. when the last stable release is broken/unsecure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. I don't really know which plans @artemp has regarding mapnik 4.0.0. I've just started contributing first things to mapnik like the CMake build and windows support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merged. Patch could be removed
@dotlambda Sure, I'll open a separate PR! |
@dotlambda |
9d438be
to
468aca4
Compare
No. Let's just wait for the next official mapnik release. |
Perhaps reconsider, in light of PR #180578 |
In fact, mapnik's tests fail in #179406, so we need the mapnik upgrade.
|
Well, that sounds easy to fix, as it hints:
|
I just rebased on latest nixpkgs master and bumped to latest mapnik master. |
I think we should squash the commits together. |
@SuperSandro2000 I wanted to wait with that until it is mergeable, so the development of the PR remains observable. |
I fixed the import by using the same version of PROJ for mapnik and python-mapnik. |
@dotlambda This is great news, thanks a lot! I was almost ready to give up, as I'm having a hard time remembering what I did back then. How about we just disable the tests for now and do it some other time? I'll squash the commits then so this can be reviewed again. |
Okay, sounds good. |
@erictapen Please squash if the changes look good to you. I suggest we move the last two commits to a separate PR targeting staging. |
Just returned from my holidays. I squashed everything and removed your last two commits @dotlambda, I also think a separate PR would be good for them, thx. |
# mapnik-config is currently not build with CMake. So we use the SCons for this one. | ||
preBuild = '' | ||
cd .. | ||
${scons}/bin/scons utils/mapnik-config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${scons}/bin/scons utils/mapnik-config | |
scons utils/mapnik-config |
Please add scons to nativeBuildInputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that breaks the build, as stdenv tries to build everything with scons then. I amended the comment to clarify that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we fix this when we send https://github.com/NixOS/nixpkgs/compare/6d76b47387dd183779e39f8433f08443bd4bb3a7..4e0c6386b64b158e29927c5d9472ead45f81b807 to staging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the solution, but can't we just merge this and then put these changes on top (via staging)? Seems like a rather unproblematic occurence of non-idiomatic code to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also use buildPackages.scons
and avoid nativeBuildInputs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point about buildPackages
, I included that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The radioboat commit shouldn't be here.
@dotlambda Right, don't know how that slipped in. |
- use CMake. I just didn't got it to work with SCons. - patch cmake to find harfbuzz - prefetch catch2 for enabling tests - add erictapen as maintainer - build mapnik-config with scons, as it isn't build by cmake - use python3 exclusively - build with harfbuzz-icu - change license to lgpl21Plus - use PROJ 8 - use latest scons, but use cmake for everything but mapnik-config - don't make postgresql optional Co-Authored-by: Robert Schütz <[email protected]>
…9-08 Also: - use libxml2 for xml parsing - use newest boost - patch to find libmapnik{json,wkt}.a - fix license - add erictapen as maintainer - use same harfbuzz as mapnik - use pytestCheckHook, disable failing tests Co-Authored-by: Robert Schütz <[email protected]>
included in #179406 |
Motivation for this change
Mapnik is currently broken, so I don't see any other choice than to use current master. I also bumped python-mapnik to latest master and fixed the build.
It required some minor patches, that I'm willing to maintain for future releases.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)