2020-06-28 23:19:38 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, expat
|
|
|
|
, proj
|
|
|
|
, bzip2
|
|
|
|
, zlib
|
|
|
|
, boost
|
|
|
|
, postgresql
|
|
|
|
, withLuaJIT ? false
|
|
|
|
, lua
|
|
|
|
, luajit
|
2020-06-28 23:21:06 +01:00
|
|
|
, libosmium
|
2020-06-28 23:23:21 +01:00
|
|
|
, protozero
|
2020-06-28 23:19:38 +01:00
|
|
|
}:
|
2017-04-17 21:19:41 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "osm2pgsql";
|
2020-08-02 10:06:33 +01:00
|
|
|
version = "1.3.0";
|
2017-04-17 21:19:41 +01:00
|
|
|
|
2019-07-11 12:06:01 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openstreetmap";
|
2019-10-13 10:37:39 +01:00
|
|
|
repo = pname;
|
2019-07-11 12:06:01 +01:00
|
|
|
rev = version;
|
2020-08-02 10:06:33 +01:00
|
|
|
sha256 = "1dsyhcifixmcw05qxjald02pml0zfdij81pgy9yh8p00v0rqq57x";
|
2017-04-17 21:19:41 +01:00
|
|
|
};
|
|
|
|
|
2019-07-11 12:06:01 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2020-06-28 23:23:21 +01:00
|
|
|
buildInputs = [ expat proj bzip2 zlib boost postgresql libosmium protozero ]
|
2020-02-10 18:28:33 +00:00
|
|
|
++ stdenv.lib.optional withLuaJIT luajit
|
|
|
|
++ stdenv.lib.optional (!withLuaJIT) lua;
|
|
|
|
|
2020-06-28 23:23:21 +01:00
|
|
|
cmakeFlags = [ "-DEXTERNAL_LIBOSMIUM=ON" "-DEXTERNAL_PROTOZERO=ON" ]
|
2020-06-28 23:21:06 +01:00
|
|
|
++ stdenv.lib.optional withLuaJIT "-DWITH_LUAJIT:BOOL=ON";
|
2019-07-11 12:06:01 +01:00
|
|
|
|
2019-10-30 11:34:47 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H";
|
2019-07-11 12:06:01 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-04-17 21:19:41 +01:00
|
|
|
description = "OpenStreetMap data to PostgreSQL converter";
|
2019-10-13 10:37:39 +01:00
|
|
|
homepage = "https://github.com/openstreetmap/osm2pgsql";
|
2019-07-11 12:06:01 +01:00
|
|
|
license = licenses.gpl2;
|
2020-02-10 18:28:33 +00:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2020-06-28 23:35:02 +01:00
|
|
|
maintainers = with maintainers; [ jglukasik das-g ];
|
2017-04-17 21:19:41 +01:00
|
|
|
};
|
|
|
|
}
|