nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.03 32 lines 965 B view raw
1{ stdenv, fetchFromGitHub, cmake, expat, proj, bzip2, zlib, boost, postgresql 2, withLuaJIT ? false, lua, luajit }: 3 4stdenv.mkDerivation rec { 5 pname = "osm2pgsql"; 6 version = "1.2.1"; 7 8 src = fetchFromGitHub { 9 owner = "openstreetmap"; 10 repo = pname; 11 rev = version; 12 sha256 = "1ysan01lpqzjxlq3y2kdminfjs5d9zksicpf9vvzpdk3fzq51fc9"; 13 }; 14 15 nativeBuildInputs = [ cmake ]; 16 17 buildInputs = [ expat proj bzip2 zlib boost postgresql ] 18 ++ stdenv.lib.optional withLuaJIT luajit 19 ++ stdenv.lib.optional (!withLuaJIT) lua; 20 21 cmakeFlags = stdenv.lib.optional withLuaJIT "-DWITH_LUAJIT:BOOL=ON"; 22 23 NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"; 24 25 meta = with stdenv.lib; { 26 description = "OpenStreetMap data to PostgreSQL converter"; 27 homepage = "https://github.com/openstreetmap/osm2pgsql"; 28 license = licenses.gpl2; 29 platforms = with platforms; linux ++ darwin; 30 maintainers = with maintainers; [ jglukasik ]; 31 }; 32}