Subject: [PATCH rust-team 10/10] gnu: rust-user32-sys-0.2: Use snippet.

From: Herman Rimm <[email-masked]>
Date: Mon, 30 Dec 2024 18:57:45 +0100

* gnu/packages/crates-windows.scm (rust-user32-sys-0.2): Add snippet.
[arguments]: Remove fix-cargo-toml phase.

Change-Id: I4316d89719ba1837c87729aae4b38be9d2bad3d9
---
 gnu/packages/crates-windows.scm | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/crates-windows.scm b/gnu/packages/crates-windows.scm
index 90eb31544d8..2d1818c7d9b 100644
--- a/gnu/packages/crates-windows.scm
+++ b/gnu/packages/crates-windows.scm
@@ -928,17 +928,15 @@ (define-public rust-user32-sys-0.2
        (uri (crate-uri "user32-sys" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "0ivxc7hmsxax9crdhxdd1nqwik4s9lhb2x59lc8b88bv20fp3x2f"))))
+        (base32 "0ivxc7hmsxax9crdhxdd1nqwik4s9lhb2x59lc8b88bv20fp3x2f"))
+       (modules '((guix build utils)))
+       (snippet #~(substitute* "Cargo.toml"
+                    ((", path =.*}") "}")))))
     (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs (("rust-winapi" ,rust-winapi-0.2))
-       #:cargo-development-inputs (("rust-winapi-build" ,rust-winapi-build-0.1))
-       #:phases (modify-phases %standard-phases
-                  (add-after 'unpack 'fix-cargo-toml
-                    (lambda _
-                      (substitute* "Cargo.toml"
-                        ((", path =.*}")
-                         "}")) #t)))))
+       #:cargo-development-inputs
+       (("rust-winapi-build" ,rust-winapi-build-0.1))))
     (home-page "https://github.com/retep998/winapi-rs")
     (synopsis "Function definitions for the Windows API library user32")
     (description
-- 
2.45.2