aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/rust.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/rust.scm')
-rw-r--r--gnu/packages/rust.scm18
1 files changed, 13 insertions, 5 deletions
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 87bd578e9e..e11148e89e 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1030,11 +1030,19 @@ safety and thread safety guarantees.")
(copy-recursively "src" (string-append out dest "/src")))))
(add-after 'install-rust-src 'wrap-rust-analyzer
(lambda* (#:key outputs #:allow-other-keys)
- (wrap-program (string-append (assoc-ref outputs "tools")
- "/bin/rust-analyzer")
- `("RUST_SRC_PATH" ":" =
- (,(string-append (assoc-ref outputs "rust-src")
- "/lib/rustlib/src/rust/library"))))))))))
+ (let ((bin (string-append (assoc-ref outputs "tools") "/bin")))
+ (rename-file (string-append bin "/rust-analyzer")
+ (string-append bin "/.rust-analyzer-real"))
+ (call-with-output-file (string-append bin "/rust-analyzer")
+ (lambda (port)
+ (format port "#!~a
+if test -z \"${RUST_SRC_PATH}\";then export RUST_SRC_PATH=~S;fi;
+exec -a \"$0\" \"~a\" \"$@\""
+ (which "bash")
+ (string-append (assoc-ref outputs "rust-src")
+ "/lib/rustlib/src/rust/library")
+ (string-append bin "/.rust-analyzer-real"))))
+ (chmod (string-append bin "/rust-analyzer") #o755))))))))
;; Add test inputs.
(native-inputs (cons* `("gdb" ,gdb/pinned)
`("procps" ,procps)
-to-apply crash. * gnu/system/image.scm (system-disk-image)[image-builder]: When 'partition-initializer' returns #f, fall back to INITIALIZE-ROOT-PARTITION. * gnu/tests/base.scm (run-root-unmount-test)[test-image]: Remove 'initializer' field of partition. * gnu/image.scm (<partition>)[initializer]: Add comment. Ludovic Courtès 2022-05-25Move (gnu platform) and (gnu platforms ...) to guix/....* gnu/platform.scm: * gnu/platforms/arm.scm: * gnu/platforms/hurd.scm: * gnu/platforms/mips.scm: * gnu/platforms/powerpc.scm: * gnu/platforms/riscv.scm: * gnu/platforms/s390.scm: * gnu/platforms/x86.scm: Move to guix/. * Makefile.am: * doc/guix.texi (Porting to a New Platform): * etc/release-manifest.scm: * gnu/ci.scm: * gnu/image.scm: * gnu/local.mk: * gnu/packages/bioinformatics.scm: * gnu/packages/bootstrap.scm: * gnu/packages/cross-base.scm: * gnu/packages/instrumentation.scm: * gnu/packages/linux.scm: * gnu/system/image.scm: * gnu/system/images/hurd.scm: * gnu/system/images/novena.scm: * gnu/system/images/pine64.scm: * gnu/system/images/pinebook-pro.scm: * gnu/system/images/rock64.scm: * guix/scripts/build.scm: * guix/scripts/system.scm: * guix/self.scm: Update (gnu platform...) to (guix platform...). Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Josselin Poiret