Merge pull request #91743 from das-g/osm2pgsql-with-libs-from-nixpkgs
osm2pgsql: use libs from NixPkgs instead of vendored ones
This commit is contained in:
commit
bcdf475f94
|
@ -1,5 +1,18 @@
|
||||||
{ stdenv, fetchFromGitHub, cmake, expat, proj, bzip2, zlib, boost, postgresql
|
{ stdenv
|
||||||
, withLuaJIT ? false, lua, luajit }:
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
, expat
|
||||||
|
, proj
|
||||||
|
, bzip2
|
||||||
|
, zlib
|
||||||
|
, boost
|
||||||
|
, postgresql
|
||||||
|
, withLuaJIT ? false
|
||||||
|
, lua
|
||||||
|
, luajit
|
||||||
|
, libosmium
|
||||||
|
, protozero
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "osm2pgsql";
|
pname = "osm2pgsql";
|
||||||
|
@ -14,11 +27,12 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
buildInputs = [ expat proj bzip2 zlib boost postgresql ]
|
buildInputs = [ expat proj bzip2 zlib boost postgresql libosmium protozero ]
|
||||||
++ stdenv.lib.optional withLuaJIT luajit
|
++ stdenv.lib.optional withLuaJIT luajit
|
||||||
++ stdenv.lib.optional (!withLuaJIT) lua;
|
++ stdenv.lib.optional (!withLuaJIT) lua;
|
||||||
|
|
||||||
cmakeFlags = stdenv.lib.optional withLuaJIT "-DWITH_LUAJIT:BOOL=ON";
|
cmakeFlags = [ "-DEXTERNAL_LIBOSMIUM=ON" "-DEXTERNAL_PROTOZERO=ON" ]
|
||||||
|
++ stdenv.lib.optional withLuaJIT "-DWITH_LUAJIT:BOOL=ON";
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H";
|
NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H";
|
||||||
|
|
||||||
|
@ -27,6 +41,6 @@ stdenv.mkDerivation rec {
|
||||||
homepage = "https://github.com/openstreetmap/osm2pgsql";
|
homepage = "https://github.com/openstreetmap/osm2pgsql";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
platforms = with platforms; linux ++ darwin;
|
platforms = with platforms; linux ++ darwin;
|
||||||
maintainers = with maintainers; [ jglukasik ];
|
maintainers = with maintainers; [ jglukasik das-g ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue