Subject: [PATCH 30/30] gnu: Add rust-osm-io-0.1.

From: Wilko Meyer <[email-masked]>
Date: Wed, 1 May 2024 00:27:35 +0200

* gnu/packages/geo.scm (rust-osm-io-0.1): New variable.

Change-Id: Ib64027c9f5e5cce7f136f2462bafef39356d2c96
---
 gnu/packages/geo.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 6ab2312385..0624076c72 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -43,6 +43,7 @@ (define-module (gnu packages geo)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system cargo)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
@@ -76,6 +77,7 @@ (define-module (gnu packages geo)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cran)
+  #:use-module (gnu packages crates-io)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages datastructures)
   #:use-module (gnu packages docbook)
@@ -2418,6 +2420,51 @@ (define-public routino
     (home-page "https://www.routino.org/")
     (license license:agpl3+)))
 
+(define-public rust-osm-io-0.1
+  (package
+    (name "rust-osm-io")
+    (version "0.1.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "osm-io" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0a46rpsal967gjjq8dxrj43rs8v33g6c800z350fjzm39zrr8yhw"))))
+    (native-inputs (list protobuf))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-test-flags
+       '("--release" "--"
+         "--skip=test_apidb_dump_reader_parallel_pbf_writer_pipe"
+         "--skip=test_apidb_dump_reader_pbf_writer_pipe"
+         "--skip=test_pbf_reader_apidb_dump_writer_pipe")
+       #:cargo-inputs (("rust-anyhow" ,rust-anyhow-1)
+                       ("rust-bytes" ,rust-bytes-1)
+                       ("rust-chrono" ,rust-chrono-0.4)
+                       ("rust-command-executor" ,rust-command-executor-0.1)
+                       ("rust-escape-string" ,rust-escape-string-0.1)
+                       ("rust-flate2" ,rust-flate2-1)
+                       ("rust-json" ,rust-json-0.12)
+                       ("rust-log" ,rust-log-0.4)
+                       ("rust-num-format" ,rust-num-format-0.4)
+                       ("rust-num-cpus" ,rust-num-cpus-1)
+                       ("rust-postgres" ,rust-postgres-0.19)
+                       ("rust-prost" ,rust-prost-0.12)
+                       ("rust-prost-build" ,rust-prost-build-0.12)
+                       ("rust-rand" ,rust-rand-0.8)
+                       ("rust-regex" ,rust-regex-1)
+                       ("rust-simple-logger" ,rust-simple-logger-4)
+                       ("rust-text-file-sort" ,rust-text-file-sort-0.1)
+                       ("rust-transient-btree-index" ,rust-transient-btree-index-0.5)
+                       ("rust-unescape" ,rust-unescape-0.1)
+                       ("rust-uuid" ,rust-uuid-1))
+       #:cargo-development-inputs (("rust-benchmark-rs" ,rust-benchmark-rs-0.1))))
+    (home-page "https://www.navigatorsguild.io/")
+    (synopsis "Read and write OSM data")
+    (description "This crate provides a way to read and write OSM data.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public r-rnaturalearthhires
   (let ((commit "c3785a8c44738de6ae8f797080c0a337ebed929d")
         (revision "1"))
-- 
2.41.0