nixpkgs-suyu/pkgs/tools/misc/osm2pgsql/default.nix

33 lines
965 B
Nix
Raw Normal View History

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