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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
982 B
Nix
Raw Normal View History

{ lib, stdenv
2020-06-28 22:19:38 +00:00
, fetchFromGitHub
, cmake
, expat
, proj
, bzip2
, zlib
, boost
, postgresql
, withLuaJIT ? false
, lua
, luajit
2020-06-28 22:21:06 +00:00
, libosmium
2020-06-28 22:23:21 +00:00
, protozero
2020-06-28 22:19:38 +00:00
}:
2017-04-17 20:19:41 +00:00
stdenv.mkDerivation rec {
pname = "osm2pgsql";
2022-01-29 11:21:58 +00:00
version = "1.6.0";
2017-04-17 20:19:41 +00:00
2019-07-11 11:06:01 +00:00
src = fetchFromGitHub {
owner = "openstreetmap";
repo = pname;
2019-07-11 11:06:01 +00:00
rev = version;
2022-01-29 11:21:58 +00:00
sha256 = "sha256-6FVMv+DowMYdRdsQFL2iwG/V9D2cLWkHUVkmR3/TuUI=";
2017-04-17 20:19:41 +00:00
};
2019-07-11 11:06:01 +00:00
nativeBuildInputs = [ cmake ];
2020-06-28 22:23:21 +00:00
buildInputs = [ expat proj bzip2 zlib boost postgresql libosmium protozero ]
2021-01-15 09:19:50 +00:00
++ lib.optional withLuaJIT luajit
++ lib.optional (!withLuaJIT) lua;
2020-02-10 18:28:33 +00:00
2020-06-28 22:23:21 +00:00
cmakeFlags = [ "-DEXTERNAL_LIBOSMIUM=ON" "-DEXTERNAL_PROTOZERO=ON" ]
2021-01-15 09:19:50 +00:00
++ lib.optional withLuaJIT "-DWITH_LUAJIT:BOOL=ON";
2019-07-11 11:06:01 +00:00
meta = with lib; {
2017-04-17 20:19:41 +00:00
description = "OpenStreetMap data to PostgreSQL converter";
homepage = "https://osm2pgsql.org";
2021-06-21 17:50:05 +00:00
license = licenses.gpl2Plus;
2020-02-10 18:28:33 +00:00
platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [ jglukasik das-g ];
2017-04-17 20:19:41 +00:00
};
}