Subject: [bug#75980] [PATCH rust-team 067/106] gnu: rust-rust-htslib-0.38: Build.

From: Herman Rimm <[email-masked]>
Date: Fri, 31 Jan 2025 22:10:28 +0100

* gnu/packages/crates-io.scm (rust-rust-htslib-0.38)[source]: Fix test.
[arguments]: Build.  Add rust-serde-json-1, rust-tempfile-3 to
cargo-development-inputs.
[inputs]: Add curl, openssl, zlib.

Change-Id: I112f661cb47c3a9ae3a7c74f43ce807027f13752
---
 gnu/packages/crates-io.scm | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 4d5571a8f0e..6969a88d7e4 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -66106,18 +66106,20 @@ (define-public rust-rust-htslib-0.38
   (package
     (name "rust-rust-htslib")
     (version "0.38.2")
-    (source (origin
-              (method url-fetch)
-              (uri (crate-uri "rust-htslib" version))
-              (file-name (string-append name "-" version ".tar.gz"))
-              (sha256
-               (base32
-                "070sihnvyiyqcw8yjkdl8hvav598bsw36m722phgd2b394k6djia"))))
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "rust-htslib" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "070sihnvyiyqcw8yjkdl8hvav598bsw36m722phgd2b394k6djia"))
+       (modules '((guix build utils)))
+       (snippet #~(substitute* "src/bam/mod.rs"
+                    (("hashmap.get\\(\"SQ\".into")
+                     "hashmap.get::<String>(&\"SQ\".to_owned")))))
     (build-system cargo-build-system)
     (arguments
-     ;; TODO: cannot find openssl_src
-     `(#:skip-build? #t
-       #:cargo-inputs
+     `(#:cargo-inputs
        (("rust-bio-types" ,rust-bio-types-0.12)
         ("rust-byteorder" ,rust-byteorder-1)
         ("rust-custom-derive" ,rust-custom-derive-0.1)
@@ -66135,8 +66137,10 @@ (define-public rust-rust-htslib-0.38
         ("rust-url" ,rust-url-2))
        #:cargo-development-inputs
        (("rust-bincode" ,rust-bincode-1)
-        ("rust-pretty-assertions" ,rust-pretty-assertions-0.6))))
-    (inputs (list openssl))
+        ("rust-pretty-assertions" ,rust-pretty-assertions-0.6)
+        ("rust-serde-json" ,rust-serde-json-1)
+        ("rust-tempfile" ,rust-tempfile-3))))
+    (inputs (list curl openssl zlib))
     (native-inputs (list pkg-config))
     (home-page "https://github.com/rust-bio/rust-htslib.git")
     (synopsis "HTSlib bindings and API for reading and writing BAM files")
-- 
2.47.1