Subject: [PATCH rust-team 4/9] gnu: rust-openssl-sys-extras-0.7: Use snippet.

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

* gnu/packages/crates-io.scm (rust-openssl-sys-extras-0.7): 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 0518e9e98b..ccced67305 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -54450,25 +54450,19 @@ (define-public rust-openssl-sys-extras-0.7
      (origin
        (method url-fetch)
        (uri (crate-uri "openssl-sys-extras" version))
-       (file-name
-        (string-append name "-" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32
-         "1ymrmfnknyjji74fflbnnq9r5ihx25h0vgs5y203vl6klzdy3i8i"))))
+        (base32 "1ymrmfnknyjji74fflbnnq9r5ihx25h0vgs5y203vl6klzdy3i8i"))
+       (modules '((guix build utils)))
+       (snippet #~(substitute* "Cargo.toml"
+                    ((", path =.*}") "}")))))
     (build-system cargo-build-system)
     (arguments
      `(#:skip-build? #t ; Depends on openssl-1.0.
        #:cargo-inputs
        (("rust-libc" ,rust-libc-0.2)
         ("rust-openssl-sys" ,rust-openssl-sys-0.7)
-        ("rust-gcc" ,rust-gcc-0.3))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-cargo-toml
-           (lambda _
-             (substitute* "Cargo.toml"
-               ((", path =.*}") "}"))
-             #t)))))
+        ("rust-gcc" ,rust-gcc-0.3))))
     (home-page "https://github.com/sfackler/rust-openssl")
     (synopsis
      "Extra FFI bindings to OpenSSL that require a C shim")
-- 
2.45.2