Subject: [bug#70146] [PATCH 079/147] gnu: Add rust-addr2line-0.21.

From: Jean-Pierre De Jesus DIAZ <[email-masked]>
Date: Tue, 2 Apr 2024 18:04:31 +0200

* gnu/packages/crates-io.scm (rust-addr2line-0.21): New variable.
(rust-addr2line-0.19): Inherit from rust-addr2line-0.21.

Change-Id: I654868196635ab06e42483224d3f05c189c611f5
---
 gnu/packages/crates-io.scm | 41 ++++++++++++++++++++++++++++++--------
 1 file changed, 33 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index a4bb79b03f..99ff1c153c 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -449,8 +449,40 @@ (define-public rust-adblock-0.5
         ("rust-sha2" ,rust-sha2-0.9)
         ("rust-tokio" ,rust-tokio-1))))))
 
+(define-public rust-addr2line-0.21
+  (package
+    (name "rust-addr2line")
+    (version "0.21.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "addr2line" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1jx0k3iwyqr8klqbzk6kjvr496yd94aspis10vwsj5wy7gib4c4a"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs (("rust-compiler-builtins" ,rust-compiler-builtins-0.1)
+                       ("rust-cpp-demangle" ,rust-cpp-demangle-0.4)
+                       ("rust-fallible-iterator" ,rust-fallible-iterator-0.3)
+                       ("rust-gimli" ,rust-gimli-0.28)
+                       ("rust-memmap2" ,rust-memmap2-0.5)
+                       ("rust-object" ,rust-object-0.32)
+                       ("rust-rustc-demangle" ,rust-rustc-demangle-0.1)
+                       ("rust-rustc-std-workspace-alloc" ,rust-rustc-std-workspace-alloc-1)
+                       ("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core-1)
+                       ("rust-smallvec" ,rust-smallvec-1))))
+    (home-page "https://github.com/gimli-rs/addr2line")
+    (synopsis "Symbolication library written in Rust, using gimli")
+    (description
+     "This package provides a cross-platform symbolication library written in
+Rust, using gimli.")
+    (license (list license:asl2.0 license:expat))))
+
 (define-public rust-addr2line-0.19
   (package
+    (inherit rust-addr2line-0.21)
     (name "rust-addr2line")
     (version "0.19.0")
     (source (origin
@@ -460,7 +492,6 @@ (define-public rust-addr2line-0.19
               (sha256
                (base32
                 "15ywmr5wx22q69ffnn79qp65ir5p1x0k2q06plcpv6v74c5xcvx7"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:tests? #f      ; use of undeclared crate or module `auxiliary`
        #:cargo-inputs
@@ -479,13 +510,7 @@ (define-public rust-addr2line-0.19
         ("rust-findshlibs" ,rust-findshlibs-0.10)
         ("rust-memmap2" ,rust-memmap2-0.5)
         ("rust-rustc-test" ,rust-rustc-test-0.3)
-        ("rust-typed-arena" ,rust-typed-arena-2))))
-    (home-page "https://github.com/gimli-rs/addr2line")
-    (synopsis "Symbolication library written in Rust, using gimli")
-    (description
-     "This package provides a cross-platform symbolication library written in
-Rust, using gimli.")
-    (license (list license:asl2.0 license:expat))))
+        ("rust-typed-arena" ,rust-typed-arena-2))))))
 
 (define-public rust-addchain-0.2
   (package
-- 
2.41.0