diff options
author | Julien Lepiller <julien@lepiller.eu> | 2018-09-23 22:37:17 +0200 |
---|---|---|
committer | Julien Lepiller <julien@lepiller.eu> | 2018-09-29 12:39:42 +0200 |
commit | b0e2299ad8164b986ae0f9081dad30f3332c91e5 (patch) | |
tree | edb59df70bf03c0afe495051c0dd359f5d8fc893 /gnu/packages/geo.scm | |
parent | 889e94e343b0784598134b333cc328ed41f387ba (diff) | |
download | guix-b0e2299ad8164b986ae0f9081dad30f3332c91e5.tar.gz |
gnu: Add osm2pgsql.
* gnu/packages/geo.scm (osm2pgsql): New variable.
Diffstat (limited to 'gnu/packages/geo.scm')
-rw-r--r-- | gnu/packages/geo.scm | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index 990c2a6b02..9644bf9d9e 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -48,6 +48,7 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages image) #:use-module (gnu packages icu4c) + #:use-module (gnu packages lua) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -907,3 +908,50 @@ encoder in C++. The developer using protozero has to manually translate the (description "Libosmium is a fast and flexible C++ library for working with OpenStreetMap data.") (license license:boost1.0))) + +(define-public osm2pgsql + (package + (name "osm2pgsql") + (version "0.96.0") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/openstreetmap/osm2pgsql/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "08y7776r4l9v9177a4q6cfdri0lpirky96m6g699hwl7v1vhw0mn")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "contrib/protozero") + (delete-file-recursively "contrib/libosmium") + #t)))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f; tests fail because we need to setup a database + #:configure-flags + (list (string-append "-DOSMIUM_INCLUDE_DIR=" + (assoc-ref %build-inputs "libosmium") + "/include") + (string-append "-DPROTOZERO_INCLUDE_DIR=" + (assoc-ref %build-inputs "protozero") + "/include")))) + (inputs + `(("boost" ,boost) + ("expat" ,expat) + ("libosmium" ,libosmium) + ("lua" ,lua) + ("postgresql" ,postgresql) + ("proj.4" ,proj.4) + ("protozero" ,protozero) + ("zlib" ,zlib))) + (native-inputs + `(("python-2" ,python-2) + ("python2-psycopg2" ,python2-psycopg2))) + (home-page "https://github.com/openstreetmap/osm2pgsql") + (synopsis "OSM data importer to postgresql") + (description "Osm2pgsql is a tool for loading OpenStreetMap data into a +PostgreSQL / PostGIS database suitable for applications like rendering into a +map, geocoding with Nominatim, or general analysis.") + (license license:gpl2+))) |