From 38f9a57c3b3fe2e50da3175fd98e545e27b3ac0e Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Mon, 15 Aug 2022 11:04:01 +0300 Subject: [PATCH] =?UTF-8?q?osm2pgsql:=201.6.0=20=E2=86=92=201.7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/tools/misc/osm2pgsql/default.nix | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/misc/osm2pgsql/default.nix b/pkgs/tools/misc/osm2pgsql/default.nix index 0a3103cd4f9..297f98ee3db 100644 --- a/pkgs/tools/misc/osm2pgsql/default.nix +++ b/pkgs/tools/misc/osm2pgsql/default.nix @@ -2,6 +2,7 @@ , fetchFromGitHub , cmake , expat +, fmt , proj , bzip2 , zlib @@ -12,33 +13,43 @@ , luajit , libosmium , protozero +, rapidjson }: stdenv.mkDerivation rec { pname = "osm2pgsql"; - version = "1.6.0"; + version = "1.7.0"; src = fetchFromGitHub { owner = "openstreetmap"; repo = pname; rev = version; - sha256 = "sha256-6FVMv+DowMYdRdsQFL2iwG/V9D2cLWkHUVkmR3/TuUI="; + hash = "sha256-MWJzCZdqvy/nH1Doj0fmGuzTubaHDnPOED7qgzvJ3ZU="; }; + postPatch = '' + # Remove bundled libraries + rm -r contrib + ''; + nativeBuildInputs = [ cmake ]; - buildInputs = [ expat proj bzip2 zlib boost postgresql libosmium protozero ] + buildInputs = [ expat fmt proj bzip2 zlib boost postgresql libosmium protozero rapidjson ] ++ lib.optional withLuaJIT luajit ++ lib.optional (!withLuaJIT) lua; - cmakeFlags = [ "-DEXTERNAL_LIBOSMIUM=ON" "-DEXTERNAL_PROTOZERO=ON" ] - ++ lib.optional withLuaJIT "-DWITH_LUAJIT:BOOL=ON"; + cmakeFlags = [ + "-DEXTERNAL_LIBOSMIUM=ON" + "-DEXTERNAL_PROTOZERO=ON" + "-DEXTERNAL_RAPIDJSON=ON" + "-DEXTERNAL_FMT=ON" + ] ++ lib.optional withLuaJIT "-DWITH_LUAJIT:BOOL=ON"; meta = with lib; { description = "OpenStreetMap data to PostgreSQL converter"; homepage = "https://osm2pgsql.org"; license = licenses.gpl2Plus; - platforms = with platforms; linux ++ darwin; + platforms = platforms.unix; maintainers = with maintainers; [ jglukasik das-g ]; }; }