diff --git a/pkgs/development/libraries/mapnik/catch2-src.patch b/pkgs/development/libraries/mapnik/catch2-src.patch deleted file mode 100644 index 04c6f7add217..000000000000 --- a/pkgs/development/libraries/mapnik/catch2-src.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 0705ddce1..771291b88 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -7,8 +7,7 @@ include(FetchContent) - - FetchContent_Declare( - Catch2 -- GIT_REPOSITORY https://github.com/catchorg/Catch2.git -- GIT_TAG v2.13.7) -+ SOURCE_DIR @catch2_src@) - FetchContent_MakeAvailable(Catch2) - - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.19.0") diff --git a/pkgs/development/libraries/mapnik/default.nix b/pkgs/development/libraries/mapnik/default.nix index 7d8848f59b58..2038a185ed94 100644 --- a/pkgs/development/libraries/mapnik/default.nix +++ b/pkgs/development/libraries/mapnik/default.nix @@ -1,29 +1,29 @@ -{ lib -, stdenv -, fetchFromGitHub -, buildPackages -, cmake -, pkg-config -, substituteAll -, boost -, cairo -, freetype -, gdal -, harfbuzz -, icu -, libjpeg -, libpng -, libtiff -, libwebp -, libxml2 -, proj -, python3 -, sqlite -, zlib -, catch2 -, postgresql -, protozero -, sparsehash +{ + lib, + stdenv, + fetchFromGitHub, + buildPackages, + cmake, + pkg-config, + boost, + cairo, + freetype, + gdal, + harfbuzz, + icu, + libjpeg, + libpng, + libtiff, + libwebp, + libxml2, + proj, + python3, + sqlite, + zlib, + catch2, + postgresql, + protozero, + sparsehash, }: stdenv.mkDerivation rec { @@ -56,18 +56,16 @@ stdenv.mkDerivation rec { # Upstream HarfBuzz wants to drop CMake support anyway. # See discussion: https://github.com/mapnik/mapnik/issues/4265 ./cmake-harfbuzz.patch - # prevent CMake from trying to get libraries on the Internet - (substituteAll { - src = ./catch2-src.patch; - catch2_src = catch2.src; - }) # Account for full paths when generating libmapnik.pc ./export-pkg-config-full-paths.patch # Use 'sparsehash' package. ./use-sparsehash-package.patch ]; - nativeBuildInputs = [ cmake pkg-config ]; + nativeBuildInputs = [ + cmake + pkg-config + ]; buildInputs = [ boost @@ -100,6 +98,8 @@ stdenv.mkDerivation rec { (lib.cmakeBool "USE_EXTERNAL_MAPBOX_PROTOZERO" true) # macOS builds fail when using memory mapped file cache. (lib.cmakeBool "USE_MEMORY_MAPPED_FILE" (!stdenv.hostPlatform.isDarwin)) + # don't try to download sources for catch2, use our own + (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_CATCH2" "${catch2.src}") ]; doCheck = true; @@ -122,7 +122,10 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Open source toolkit for developing mapping applications"; homepage = "https://mapnik.org"; - maintainers = with maintainers; [ hrdinka hummeltech ]; + maintainers = with maintainers; [ + hrdinka + hummeltech + ]; license = licenses.lgpl21Plus; platforms = platforms.all; };