summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--johnlepikhin/packages/rust.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/johnlepikhin/packages/rust.scm b/johnlepikhin/packages/rust.scm
index 0b50064..747b443 100644
--- a/johnlepikhin/packages/rust.scm
+++ b/johnlepikhin/packages/rust.scm
@@ -967,6 +967,13 @@ safety and thread safety guarantees.")
(replace 'install
;; Phase overridden to also install rustfmt.
(lambda* (#:key outputs #:allow-other-keys)
+ ;; Copy source code required by rust-analyzer
+ (let* ((out (assoc-ref outputs "out"))
+ (src (string-append out "/lib/rustlib/src/rust")))
+ (mkdir-p src)
+ (copy-recursively "library" (string-append src "/library"))
+ (copy-recursively "src" (string-append src "/src")))
+
(invoke "./x.py" "install")
(substitute* "config.toml"
;; Adjust the prefix to the 'cargo' output.