Subject: [bug#53208] [PATCH 31/39] gnu: Add rust-object-0.28.

From: Z572 <[email-masked]>
Date: Wed, 12 Jan 2022 23:27:51 +0800

* gnu/packages/crates-io.scm (rust-object-0.28): New variable.
(rust-object-0.24): Inherit from above.
---
 gnu/packages/crates-io.scm | 49 ++++++++++++++++++++++++++++++++++----
 1 file changed, 45 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 9dce8a07e4..8e4c6e6f47 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -35255,10 +35255,10 @@ (define-public rust-objc-test-utils-0.0
      "This package provides utilities for testing Objective-C interop.")
     (license license:expat)))
 
-(define-public rust-object-0.24
+(define-public rust-object-0.28
   (package
     (name "rust-object")
-    (version "0.24.0")
+    (version "0.28.2")
     (source
      (origin
        (method url-fetch)
@@ -35267,7 +35267,7 @@ (define-public rust-object-0.24
         (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0w21hp41mixzaavsdpjylbylh44z2b5d2wbnf5ipkvkjq38ksnqs"))))
+         "1wgv6gx69rpn4jjqs24kvafwsic1q06iaafs5mb9hy34hp7c3x89"))))
     (build-system cargo-build-system)
     (arguments
      `(#:skip-build? #t
@@ -35276,14 +35276,24 @@ (define-public rust-object-0.24
          ,rust-compiler-builtins-0.1)
         ("rust-crc32fast" ,rust-crc32fast-1)
         ("rust-flate2" ,rust-flate2-1)
+        ("rust-hashbrown" ,rust-hashbrown-0.11)
         ("rust-indexmap" ,rust-indexmap-1)
+        ("rust-memchr" ,rust-memchr-2)
         ("rust-rustc-std-workspace-alloc"
          ,rust-rustc-std-workspace-alloc-1)
         ("rust-rustc-std-workspace-core"
          ,rust-rustc-std-workspace-core-1)
         ("rust-wasmparser" ,rust-wasmparser-0.57))
        #:cargo-development-inputs
-       (("rust-memmap" ,rust-memmap-0.7))))
+       (("rust-memmap" ,rust-memmap-0.7))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-version-requirements
+           (lambda _
+             (substitute* "Cargo.toml"
+               (("1.6.\\*")
+                ,(package-version rust-indexmap-1)))
+             #t)))))
     (home-page "https://github.com/gimli-rs/object")
     (synopsis "Unified interface for reading and writing object file formats")
     (description
@@ -35291,6 +35301,37 @@ (define-public rust-object-0.24
 file formats.")
     (license (list license:asl2.0 license:expat))))
 
+(define-public rust-object-0.24
+  (package
+    (inherit rust-object-0.28)
+    (name "rust-object")
+    (version "0.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "object" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0w21hp41mixzaavsdpjylbylh44z2b5d2wbnf5ipkvkjq38ksnqs"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs
+       (("rust-compiler-builtins"
+         ,rust-compiler-builtins-0.1)
+        ("rust-crc32fast" ,rust-crc32fast-1)
+        ("rust-flate2" ,rust-flate2-1)
+        ("rust-indexmap" ,rust-indexmap-1)
+        ("rust-rustc-std-workspace-alloc"
+         ,rust-rustc-std-workspace-alloc-1)
+        ("rust-rustc-std-workspace-core"
+         ,rust-rustc-std-workspace-core-1)
+        ("rust-wasmparser" ,rust-wasmparser-0.57))
+       #:cargo-development-inputs
+       (("rust-memmap" ,rust-memmap-0.7))))))
+
 (define-public rust-object-0.23
   (package
     (inherit rust-object-0.24)
-- 
2.34.0