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

Message ID a1b89afb6dc0387c4f90b1796eec9504e8f7cbcf.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-serde-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(-)
  

Patch

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index ccced67305..672846f54c 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -75664,20 +75664,14 @@  (define-public rust-serde-0.9
      (origin
        (method url-fetch)
        (uri (crate-uri "serde" version))
-       (file-name
-        (string-append name "-" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32
-         "1bsla8l5xr9pp5sirkal6mngxcq6q961km88jvf339j5ff8j7dil"))))
+        (base32 "1bsla8l5xr9pp5sirkal6mngxcq6q961km88jvf339j5ff8j7dil"))
+       (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-serde-derive" ,rust-serde-derive-0.9))
        #:cargo-development-inputs
        (("rust-serde-derive" ,rust-serde-derive-0.9))))))