Subject: [PATCH rust-team 6/9] gnu: rust-serde-derive-0.9: Use snippet.

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

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

Change-Id: I27e5999daa849c2e9300ab5d7174c093a23f28ea
---
 gnu/packages/crates-io.scm | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 672846f54c..f08278c9ce 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -75967,20 +75967,14 @@ (define-public rust-serde-derive-0.9
      (origin
        (method url-fetch)
        (uri (crate-uri "serde_derive" version))
-       (file-name
-        (string-append name "-" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32
-         "1fkldf0lnl6pwxs00qpyp79m30qmfpi3bk0wm22211ylyikdi3wp"))))
+        (base32 "1fkldf0lnl6pwxs00qpyp79m30qmfpi3bk0wm22211ylyikdi3wp"))
+       (modules '((guix build utils)))
+       (snippet #~(substitute* "Cargo.toml"
+                    ((", path =.*}") "}")))))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-cargo-toml
-           (lambda _
-             (substitute* "Cargo.toml"
-               ((", path =.*}") "}"))
-             #t)))
-       #:cargo-inputs
+     `(#:cargo-inputs
        (("rust-quote" ,rust-quote-0.3)
         ("rust-serde-codegen-internals" ,rust-serde-codegen-internals-0.14)
         ("rust-syn" ,rust-syn-0.11))))))
-- 
2.45.2