17 stdenv.mkDerivation rec {
21 src = fetchFromGitHub {
22 owner = "openstreetmap";
25 sha256 = "141blh6lwbgn8hh45xaa0yiwygdc444h9zahx5xrzx5pck9zb5ps";
28 nativeBuildInputs = [ cmake ];
30 buildInputs = [ expat proj bzip2 zlib boost postgresql libosmium protozero ]
31 ++ lib.optional withLuaJIT luajit
32 ++ lib.optional (!withLuaJIT) lua;
34 cmakeFlags = [ "-DEXTERNAL_LIBOSMIUM=ON" "-DEXTERNAL_PROTOZERO=ON" ]
35 ++ lib.optional withLuaJIT "-DWITH_LUAJIT:BOOL=ON";
37 NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H";
40 description = "OpenStreetMap data to PostgreSQL converter";
41 homepage = "https://osm2pgsql.org";
42 license = licenses.gpl2;
43 platforms = with platforms; linux ++ darwin;
44 maintainers = with maintainers; [ jglukasik das-g ];