gnu: rust: Move remove-uninstall-script to rust.

* gnu/packages/rust.scm (rust)[arguments]: Add 'remove-uninstall-script
phase.
(make-rust-sysroot)[arguments]: Remove 'remove-uninstall-script phase.

Change-Id: I45bcaaa89003693b490b914efbfa34236a8f4db6
This commit is contained in:
Efraim Flashner 2023-12-17 16:51:49 +02:00
parent 193a01d73f
commit 072a9c60ab
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -1041,6 +1041,12 @@ (define-public rust
(mkdir-p (string-append out dest))
(copy-recursively "library" (string-append out dest "/library"))
(copy-recursively "src" (string-append out dest "/src")))))
(add-after 'install 'remove-uninstall-script
(lambda* (#:key outputs #:allow-other-keys)
;; This script has no use on Guix
;; and it retains a reference to the host's bash.
(delete-file (string-append (assoc-ref outputs "out")
"/lib/rustlib/uninstall.sh"))))
(add-after 'install-rust-src 'wrap-rust-analyzer
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "tools") "/bin")))
@ -1195,12 +1201,6 @@ (define make-rust-sysroot/implementation
(replace 'install
(lambda _
(invoke "./x.py" "install" "library/std")))
(add-after 'install 'remove-uninstall-script
(lambda* (#:key outputs #:allow-other-keys)
;; This script has no use on Guix
;; and it retains a reference to the host's bash.
(delete-file (string-append (assoc-ref outputs "out")
"/lib/rustlib/uninstall.sh"))))
(delete 'install-rust-src)
(delete 'wrap-rust-analyzer)
(delete 'wrap-rustc)))))