2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-06-28 22:19:38 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, expat
|
2022-08-15 08:04:01 +00:00
|
|
|
, fmt
|
2020-06-28 22:19:38 +00:00
|
|
|
, proj
|
|
|
|
, bzip2
|
|
|
|
, zlib
|
|
|
|
, boost
|
|
|
|
, postgresql
|
2023-09-20 21:12:15 +00:00
|
|
|
, python3
|
2020-06-28 22:19:38 +00:00
|
|
|
, withLuaJIT ? false
|
|
|
|
, lua
|
|
|
|
, luajit
|
2020-06-28 22:21:06 +00:00
|
|
|
, libosmium
|
2023-08-18 21:58:57 +00:00
|
|
|
, nlohmann_json
|
2023-11-26 19:54:00 +00:00
|
|
|
, opencv
|
2023-08-18 21:58:57 +00:00
|
|
|
, potrace
|
2020-06-28 22:23:21 +00:00
|
|
|
, protozero
|
2022-10-04 20:34:02 +00:00
|
|
|
, testers
|
2020-06-28 22:19:38 +00:00
|
|
|
}:
|
2017-04-17 20:19:41 +00:00
|
|
|
|
2022-10-04 20:34:02 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "osm2pgsql";
|
2023-11-26 19:54:00 +00:00
|
|
|
version = "1.10.0";
|
2017-04-17 20:19:41 +00:00
|
|
|
|
2019-07-11 11:06:01 +00:00
|
|
|
src = fetchFromGitHub {
|
2023-09-20 21:12:15 +00:00
|
|
|
owner = "osm2pgsql-dev";
|
2022-10-04 20:34:02 +00:00
|
|
|
repo = "osm2pgsql";
|
|
|
|
rev = finalAttrs.version;
|
2023-11-26 19:54:00 +00:00
|
|
|
hash = "sha256-IFAQ7iA37QXnWOSxUjh9EW7ss85k0h948JGuuUcpr5w=";
|
2017-04-17 20:19:41 +00:00
|
|
|
};
|
|
|
|
|
2022-08-15 08:04:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Remove bundled libraries
|
|
|
|
rm -r contrib
|
|
|
|
'';
|
|
|
|
|
2019-07-11 11:06:01 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2023-08-18 21:58:57 +00:00
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
bzip2
|
|
|
|
expat
|
|
|
|
fmt
|
|
|
|
libosmium
|
|
|
|
nlohmann_json
|
2023-11-26 19:54:00 +00:00
|
|
|
opencv
|
2023-08-18 21:58:57 +00:00
|
|
|
postgresql
|
|
|
|
potrace
|
|
|
|
proj
|
|
|
|
protozero
|
2023-09-20 21:12:15 +00:00
|
|
|
(python3.withPackages (p: with p; [ psycopg2 pyosmium ]))
|
2023-08-18 21:58:57 +00:00
|
|
|
zlib
|
|
|
|
] ++ lib.optional withLuaJIT luajit
|
2021-01-15 09:19:50 +00:00
|
|
|
++ lib.optional (!withLuaJIT) lua;
|
2020-02-10 18:28:33 +00:00
|
|
|
|
2022-08-15 08:04:01 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DEXTERNAL_LIBOSMIUM=ON"
|
|
|
|
"-DEXTERNAL_PROTOZERO=ON"
|
|
|
|
"-DEXTERNAL_FMT=ON"
|
|
|
|
] ++ lib.optional withLuaJIT "-DWITH_LUAJIT:BOOL=ON";
|
2019-07-11 11:06:01 +00:00
|
|
|
|
2023-08-18 21:58:57 +00:00
|
|
|
installFlags = [ "install-gen" ];
|
|
|
|
|
2022-10-04 20:34:02 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-04-17 20:19:41 +00:00
|
|
|
description = "OpenStreetMap data to PostgreSQL converter";
|
2020-12-09 13:07:19 +00:00
|
|
|
homepage = "https://osm2pgsql.org";
|
2021-06-21 17:50:05 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2022-08-15 08:04:01 +00:00
|
|
|
platforms = platforms.unix;
|
2020-06-28 22:35:02 +00:00
|
|
|
maintainers = with maintainers; [ jglukasik das-g ];
|
2017-04-17 20:19:41 +00:00
|
|
|
};
|
2022-10-04 20:34:02 +00:00
|
|
|
})
|