Subject: [bug#69620] [rust-team v3 3/9] gnu: Enables building rust-pear-codegen-0.1

From: Aaron Covrig <[email-masked]>
Date: Sun, 24 Mar 2024 11:19:55 -0400

* gnu/packages/crates-io.scm (rust-pear-codegen-0.1): Enables full build
  with tests
---
 gnu/packages/crates-io.scm | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 492c077eae..ada42a1b92 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -49347,15 +49347,25 @@ (define-public rust-pear-codegen-0.1
        (uri (crate-uri "pear_codegen" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "19lcpkfspizd4ywwvca6rxgc311m070k3ndvwa9vrbw1snjqna60"))))
+        (base32 "19lcpkfspizd4ywwvca6rxgc311m070k3ndvwa9vrbw1snjqna60"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   (delete-file "build.rs")))))
+    (build-system cargo-build-system)
     (arguments
-     `(#:skip-build? #t
-       #:cargo-inputs
-       (("rust-proc-macro2" ,rust-proc-macro2-0.4)
-        ("rust-quote" ,rust-quote-0.6)
-        ("rust-syn" ,rust-syn-0.15)
-        ("rust-version-check" ,rust-version-check-0.9)
-        ("rust-yansi" ,rust-yansi-0.5))))))
+     `(#:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2-0.4)
+                       ("rust-quote" ,rust-quote-0.6)
+                       ("rust-syn" ,rust-syn-0.15)
+                       ;; development inputs here to address build issues
+                       ("rust-version-check" ,rust-version-check-0.9)
+                       ("rust-yansi" ,rust-yansi-0.5))
+       #:cargo-development-inputs (("rust-version-check" ,rust-version-check-0.9)
+                                   ("rust-yansi" ,rust-yansi-0.5))
+       #:phases (modify-phases %standard-phases
+                  ;; Enable using nightly/dev features
+                  (add-after 'unpack 'enable-unstable-features
+                    (lambda _
+                      (setenv "RUSTC_BOOTSTRAP" "1"))))))))
 
 (define-public rust-peeking-take-while-0.1
   (package
-- 
2.41.0