Subject: [PATCH 4/6] gnu: rust-bootstrapped-package: Use modify-inputs.

From: Morgan Smith <[email-masked]>
Date: Mon, 7 Apr 2025 16:07:48 -0400

* gnu/packages/rust.scm (rust-bootstrapped-package): Use modify-inputs. Also
set the #:disallowed-references argument.

Change-Id: Idf7390eeb3035bc509a21903e38aa0071603b484
---
 gnu/packages/rust.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index ccedfd2c74..98be6d95ce 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -121,10 +121,14 @@ (define* (rust-bootstrapped-package base-rust version checksum)
        (inherit (package-source base-rust))
        (uri (rust-uri version))
        (sha256 (base32 checksum))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments base-rust)
+       ((#:disallowed-references _ '())
+        (list base-rust))))
     (native-inputs
-     (alist-replace "cargo-bootstrap" (list base-rust "cargo")
-                    (alist-replace "rustc-bootstrap" (list base-rust)
-                                   (package-native-inputs base-rust))))))
+     (modify-inputs (package-native-inputs base-rust)
+       (replace "rust" base-rust)
+       (replace "rust:cargo" (list base-rust "cargo"))))))
 
 ;;; Note: mrustc's only purpose is to be able to bootstap Rust; it's designed
 ;;; to be used in source form.
-- 
2.49.0