31 lines
878 B
Bash
31 lines
878 B
Bash
|
# Copyright 2021-2022 Gentoo Authors, projectmoon
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=7
|
||
|
|
||
|
DESCRIPTION="An implementation of Language Server Protocol for the Rust programming language"
|
||
|
HOMEPAGE="https://rust-analyzer.github.io"
|
||
|
KEYWORDS="~amd64"
|
||
|
|
||
|
# rust-analyzer makes date-based releases at the moment.
|
||
|
DATE=${PV:3:8}
|
||
|
YEAR=${DATE:0:4}
|
||
|
MONTH=${DATE:4:2}
|
||
|
DAY=${DATE:6:2}
|
||
|
VERSION="${YEAR}-${MONTH}-${DAY}"
|
||
|
|
||
|
SRC_URI="https://github.com/rust-analyzer/rust-analyzer/releases/download/${VERSION}/rust-analyzer-x86_64-unknown-linux-gnu.gz -> rust-analyzer-${VERSION}.gz"
|
||
|
LICENSE="Apache-2.0 MIT-with-advertising"
|
||
|
SLOT="0"
|
||
|
PROPERTIES="live"
|
||
|
|
||
|
S=${WORKDIR}
|
||
|
|
||
|
src_install() {
|
||
|
newbin "rust-analyzer-${VERSION}" rust-analyzer
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
elog "Make sure to add your desired rust toolchain (e.g. with rustup) for rust-analyzer to work correctly"
|
||
|
}
|