@@ -740,6 +740,28 @@ (define rust-1.70
(patches (search-patches "rust-1.70-fix-rustix-build.patch"))
(patch-flags '("-p1")))))))
+(define rust-1.71
+ (let ((base-rust
+ (rust-bootstrapped-package
+ rust-1.70 "1.71.0" "15jc0d13cmrh2xvpkyyvsbwgn3w4klqiwf2wlgzfp22mvjmy8rx6")))
+ (package
+ (inherit base-rust)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base-rust)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'patch-cargo-checksums
+ (lambda _
+ ;; Cargo's Cargo.lock file needs to have its checksums replaced so
+ ;; the Cargo build doesn't fail.
+ (substitute* '("Cargo.lock"
+ "src/bootstrap/Cargo.lock"
+ "src/tools/rust-analyzer/Cargo.lock"
+ "src/tools/cargo/Cargo.lock")
+ (("(checksum = )\".*\"" all name)
+ (string-append name "\"" ,%cargo-reference-hash "\"")))
+ (generate-all-checksums "vendor"))))))))))
+
;;; Note: Only the latest versions of Rust are supported and tested. The
;;; intermediate rusts are built for bootstrapping purposes and should not
;;; be relied upon. This is to ease maintenance and reduce the time