summaryrefslogtreecommitdiff
path: root/gnu/packages/rust.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-10-28 16:39:33 +0300
committerEfraim Flashner <efraim@flashner.co.il>2023-11-28 07:59:07 +0200
commitbb108d7efd8eb7a5648547053b4a16ba67fe6a1a (patch)
tree722c67098fb9781ae72e12a82c1e13c1e7a43a7f /gnu/packages/rust.scm
parentbc13c8c87be33c4bec06a3e3d771789a884f2f8c (diff)
gnu: rust-analyzer: Move to rust.scm.
* gnu/packages/rust-apps.scm (rust-analyzer): Move ... * gnu/packages/rust.scm (rust-analyzer): ... to here. Change-Id: I24db3731370f6e798b919409a32abec4a115c913
Diffstat (limited to 'gnu/packages/rust.scm')
-rw-r--r--gnu/packages/rust.scm28
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index d72d6b2e51..87bd578e9e 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -55,12 +55,14 @@
#:use-module (gnu packages)
#:use-module (guix build-system cargo)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system trivial)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix utils)
+ #:use-module (guix gexp)
#:use-module (ice-9 match)
#:use-module (srfi srfi-26))
@@ -1037,3 +1039,29 @@ safety and thread safety guarantees.")
(native-inputs (cons* `("gdb" ,gdb/pinned)
`("procps" ,procps)
(package-native-inputs base-rust))))))
+
+(define-public rust-analyzer
+ (package
+ (name "rust-analyzer")
+ (version (package-version rust))
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ (list
+ #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (let ((rust (assoc-ref %build-inputs "rust")))
+ (install-file (string-append rust "/bin/rust-analyzer")
+ (string-append #$output "/bin"))
+ (copy-recursively (string-append rust "/share")
+ (string-append #$output "/share"))))))
+ (inputs
+ (list (list rust "tools")))
+ (home-page "https://rust-analyzer.github.io/")
+ (synopsis "Experimental Rust compiler front-end for IDEs")
+ (description "Rust-analyzer is a modular compiler frontend for the Rust
+language. It is a part of a larger rls-2.0 effort to create excellent IDE
+support for Rust.")
+ (license (list license:expat license:asl2.0))))