Subject: [bug#76872] [PATCH rust-team v3 05/10] gnu: rust-elf-0.7: New variable

From: Aaron Covrig <[email-masked]>
Date: Wed, 19 Mar 2025 19:41:32 -0400

* gnu/packages/crates-io.scm (rust-elf-0.7): New variable
---
 gnu/packages/crates-io.scm | 37 ++++++++++++++++++++++++++++++++-----
 1 file changed, 32 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index c45418c159..83bfa38a45 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -22706,10 +22706,10 @@ (define-public rust-elain-0.3
     (description "Set a type's minimum alignment with const generics.")
     (license (list license:expat license:asl2.0))))
 
-(define-public rust-elf-0.0.10
+(define-public rust-elf-0.7
   (package
     (name "rust-elf")
-    (version "0.0.10")
+    (version "0.7.4")
     (source
      (origin
        (method url-fetch)
@@ -22718,16 +22718,43 @@ (define-public rust-elf-0.0.10
         (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "1xcpf7jdmrl7rdmd6009grahvgp3k695h5x4cadrpr70vcaxwha8"))))
+         "0yyij25ps8mln1s1xzwggjr88gb2b35c8jf8az25dmfvfaar0ia4"))))
+    (arguments `(#:cargo-test-flags '("--"
+                                      ;; Missing test files
+                                      "--skip=elf_bytes::arch_tests"
+                                      "--skip=elf_bytes::interface_tests"
+                                      "--skip=elf_stream::arch_tests"
+                                      "--skip=elf_stream::interface_tests"
+                                      "--skip=src/elf_bytes.rs - elf_bytes::ElfBytes (line 33)"
+                                      "--skip=src/elf_bytes.rs - elf_bytes::ElfBytes<'data,E>::section_header_by_name (line 304)"
+                                      "--skip=src/elf_bytes.rs - elf_bytes::ElfBytes<'data,E>::section_headers_with_strtab (line 219)"
+                                      "--skip=src/elf_stream.rs - elf_stream::ElfStream<E,S>::section_header_by_name (line 212)"
+                                      "--skip=src/lib.rs - (line 83)"
+                                      "--skip=src/note.rs - note (line 4)")))
     (build-system cargo-build-system)
-    (arguments
-     `(#:cargo-inputs (("rust-byteorder" ,rust-byteorder-0.5))))
     (home-page "https://github.com/cole14/rust-elf/")
     (synopsis "Library for parsing ELF files")
     (description
      "This package provides a pure-Rust library for parsing ELF files.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-elf-0.0.10
+  (package
+    (inherit rust-elf-0.7)
+    (name "rust-elf")
+    (version "0.0.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "elf" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1xcpf7jdmrl7rdmd6009grahvgp3k695h5x4cadrpr70vcaxwha8"))))
+    (arguments
+     `(#:cargo-inputs (("rust-byteorder" ,rust-byteorder-0.5))))))
+
 (define-public rust-emacs-0.19
   (package
     (name "rust-emacs")
-- 
2.48.1