Subject: [bug#32813] [PATCH 3/4] gnu: Add osm2pgsql.

From: Julien Lepiller <[email-masked]>
Date: Sun, 23 Sep 2018 22:43:10 +0200

* gnu/packages/geo.scm (osm2pgsql): New variable.
---
 gnu/packages/geo.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 81bffcc88..efc68ea85 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -824,3 +824,33 @@ delivered to any client.")
 files and imports the data into PostgreSQL/PostGIS databases.  It is designed
 to create databases that are optimized for rendering/tile/map-services.")
     (license license:asl2.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"))))
+    (build-system cmake-build-system)
+    (arguments
+      ;; failure :/
+     `(#:tests? #f))
+    (inputs
+     `(("boost" ,boost)
+       ("expat" ,expat)
+       ("lua" ,lua)
+       ("postgresql" ,postgresql)
+       ("proj.4" ,proj.4)
+       ("zlib" ,zlib)))
+    (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)))
-- 
2.18.0