Subject: [bug#69620] [rust-team v3 6/9] gnu: Bumps rust-rocket-codegen-0.4 to 0.4.11

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

* gnu/packages/crates-web.scm (rust-rocket-codegen-0.4): Bumps to 0.4.11
  and enables building
---
 gnu/packages/crates-web.scm | 37 +++++++++++++++++++++++++------------
 1 file changed, 25 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/crates-web.scm b/gnu/packages/crates-web.scm
index d1cc9768de..e105ddae66 100644
--- a/gnu/packages/crates-web.scm
+++ b/gnu/packages/crates-web.scm
@@ -4698,24 +4698,37 @@ (define-public rust-rocket-codegen-0.4
   (package
     (inherit rust-rocket-codegen-0.5)
     (name "rust-rocket-codegen")
-    (version "0.4.7")
+    (version "0.4.11")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "rocket_codegen" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "18s2dll8c4sd26s8cfr6cizj5z55xwnk6r6x7b2wvcf8n9ajrb6f"))))
-    (arguments
-     `(#:skip-build? #t
-       #:cargo-inputs
-       (("rust-devise" ,rust-devise-0.2)
-        ("rust-glob" ,rust-glob-0.3)
-        ("rust-indexmap" ,rust-indexmap-1)
-        ("rust-quote" ,rust-quote-0.6)
-        ("rust-rocket-http" ,rust-rocket-http-0.4)
-        ("rust-version-check" ,rust-version-check-0.9)
-        ("rust-yansi" ,rust-yansi-0.5))))))
+        (base32 "1zl4f99s4df8fpkps53qn77030baww4x7zflggwql290b1xh6418"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   (substitute* "build.rs"
+                     ;; enable nightly/dev in build.rs for RUSTC_BOOTSTRAP build
+                     (("if !channel.supports_features")
+                      "/* if !channel.supports_features")
+                     (("if !version.at_least")
+                      "*/ \nif !version.at_least"))))))
+    (arguments
+     `(#:tests? #f ;Tests depend on multiple undeclared crates
+       #:cargo-inputs (("rust-devise" ,rust-devise-0.2)
+                       ("rust-glob" ,rust-glob-0.3)
+                       ("rust-indexmap" ,rust-indexmap-1)
+                       ("rust-quote" ,rust-quote-0.6)
+                       ("rust-rocket-http" ,rust-rocket-http-0.4))
+       #:cargo-development-inputs (("rust-version-check" ,rust-version-check-0.9)
+                                   ("rust-yansi" ,rust-yansi-0.5)
+                                   ("rust-rocket" ,rust-rocket-0.4)) ;For tests
+       #:phases (modify-phases %standard-phases
+                  ;; Enable using nightly/dev features
+                  (add-after 'unpack 'enable-unstable-features
+                    (lambda _
+                      (setenv "RUSTC_BOOTSTRAP" "1"))))))))
 
 (define-public rust-rocket-http-0.5
   (package
-- 
2.41.0