From d96f47f012571cdd6dd67c513e496042db303ca7 Mon Sep 17 00:00:00 2001 From: Z572 via Guix-patches via Date: Sat, 22 Jan 2022 12:37:10 +0800 Subject: gnu: rust-analyzer: Make it work out of the box. * gnu/packages/rust.scm (rust-src): New variable. * gnu/packages/rust-apps.scm (rust-analyzer): [native-inputs]: Add rust-src. [arguments]: <#:phases>: Add wrap-program phase. Signed-off-by: Nicolas Goaziou --- gnu/packages/rust.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gnu/packages/rust.scm') diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 739ffb3192..5a6d4a5c30 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2020 Matthew James Kraai ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 (unmatched parenthesis +;;; Copyright © 2022 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -49,6 +50,7 @@ (define-module (gnu packages rust) #:use-module (gnu packages tls) #:use-module (gnu packages) #:use-module (guix build-system cargo) + #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (guix download) @@ -787,3 +789,21 @@ (define rust-1.57 ;;; be relied upon. This is to ease maintenance and reduce the time ;;; required to build the full Rust bootstrap chain. (define-public rust rust-1.57) + +(define-public rust-src + (hidden-package + (package + (inherit rust) + (name "rust-src") + (build-system copy-build-system) + (native-inputs '()) + (inputs '()) + (native-search-paths '()) + (outputs '("out")) + (arguments + `(#:install-plan + '(("library" "lib/rustlib/src/rust/library") + ("src" "lib/rustlib/src/rust/src")))) + (synopsis "Source code for the Rust standard library") + (description "This package provide source code for the Rust standard +library, only use by rust-analyzer, make rust-analyzer out of the box.")))) -- cgit v1.2.3