[bug#75096,rust-team,2/9] gnu: rust-itertools-0.9: Use snippet.

Message ID 0c5475dadcb639b7bc4c6d3ffe7682634acb8373.1735155954.git.herman@rimm.ee
State New
Headers
Series [bug#75096,rust-team,1/9] gnu: rust-sha1-0.2: Use snippet. |

Commit Message

Herman Rimm Dec. 25, 2024, 7:49 p.m. UTC
  * 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(-)
  

Patch

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