Subject: [PATCH rust-team 2/9] gnu: rust-itertools-0.9: Use snippet.

From: Herman Rimm <[email-masked]>
Date: Wed, 25 Dec 2024 20:49:48 +0100

* gnu/packages/crates-io.scm (rust-itertools-0.9): Add snippet.
[phases]: Remove patch-cargo-toml phase.

Change-Id: I27e5999daa849c2e9300ab5d7174c093a23f28ea
---
 gnu/packages/crates-io.scm | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 4e05235585..2286eabb75 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -38810,14 +38810,15 @@ (define-public rust-itertools-0.9
     (name "rust-itertools")
     (version "0.9.0")
     (source
-      (origin
-        (method url-fetch)
-        (uri (crate-uri "itertools" version))
-        (file-name
-         (string-append name "-" version ".tar.gz"))
-        (sha256
-         (base32
-          "0jyml7ygr7kijkcjdl3fk5f34y5h5jsavclim7l13zjiavw1hkr8"))))
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "itertools" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0jyml7ygr7kijkcjdl3fk5f34y5h5jsavclim7l13zjiavw1hkr8"))
+       (modules '((guix build utils)))
+       (snippet #~(substitute* "Cargo.toml"
+                    (("=0.3.0") "0.3")))))
     (arguments
      `(#:cargo-inputs
        (("rust-either" ,rust-either-1))
@@ -38825,14 +38826,7 @@ (define-public rust-itertools-0.9
        (("rust-criterion" ,rust-criterion-0.3)
         ("rust-permutohedron" ,rust-permutohedron-0.2)
         ("rust-quickcheck" ,rust-quickcheck-0.9)
-        ("rust-rand" ,rust-rand-0.7))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-cargo-toml
-           (lambda _
-             (substitute* "Cargo.toml"
-               (("=0.3.0") "0.3"))
-             #t)))))))
+        ("rust-rand" ,rust-rand-0.7))))))
 
 (define-public rust-itertools-0.8
   (package
-- 
2.45.2