GNU bug report logs - #70690
[PATCH] gnu: rust: install rust-analyzer-proc-macro-srv

Previous Next

Package: guix-patches;

Reported by: Brennan Vincent <brennan <at> umanwizard.com>

Date: Wed, 1 May 2024 03:49:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 70690 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#70690; Package guix-patches. (Wed, 01 May 2024 03:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brennan Vincent <brennan <at> umanwizard.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 01 May 2024 03:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brennan Vincent <brennan <at> umanwizard.com>
To: guix-patches <at> gnu.org
Cc: Brennan Vincent <brennan <at> umanwizard.com>, efraim <at> flashner.co.il
Subject: [PATCH] gnu: rust: install rust-analyzer-proc-macro-srv
Date: Tue, 30 Apr 2024 23:47:32 -0400
* gnu/packages/rust.scm (rust): Install rust-analyzer-proc-macro-srv
rust-analyzer relies on this binary existing, and recent versions
of rust no longer install it by default.

Change-Id: I7ce59c065a35cf2592e7eb2fa57317aa9a8df675
---
 gnu/packages/rust.scm | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 8cbbac53ac..24783d8aa2 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1214,7 +1214,9 @@ (define-public rust
                            "src/tools/cargo"
                            "src/tools/clippy"
                            "src/tools/rust-analyzer"
-                           "src/tools/rustfmt"))))
+                           "src/tools/rust-analyzer/crates/proc-macro-srv-cli"
+                           "src/tools/rustfmt"))
+                 ))
              (replace 'check
                ;; Phase overridden to also test more tools.
                (lambda* (#:key tests? parallel-build? #:allow-other-keys)
@@ -1244,7 +1246,16 @@ (define-public rust
                     (format #f "prefix = ~s" (assoc-ref outputs "tools"))))
                  (invoke "./x.py" "install" "clippy")
                  (invoke "./x.py" "install" "rust-analyzer")
-                 (invoke "./x.py" "install" "rustfmt")))
+                 (invoke "./x.py" "install" "rustfmt")
+                 ;; ./x.py doesn't have an install target
+                 ;; for the proc macro server, so we install it manually
+                 (let* ((out (assoc-ref outputs "out"))
+                        (platform ,(platform-rust-target
+                                    (lookup-platform-by-target-or-system
+                                     (or (%current-target-system)
+                                         (%current-system))))))
+                   (install-file (string-append "build/" platform "/stage2-tools/" platform "/release/rust-analyzer-proc-macro-srv")
+                                 (string-append out "/libexec")))))
              (add-after 'install 'install-rust-src
                (lambda* (#:key outputs #:allow-other-keys)
                  (let ((out (assoc-ref outputs "rust-src"))
-- 
2.41.0






This bug report was last modified 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.