From 02ffc897d528fb0dc6c7255c9e009f1f2d83e3c8 Mon Sep 17 00:00:00 2001 From: psykose Date: Sat, 5 Aug 2023 01:18:22 +0000 Subject: [PATCH] contrib/rust-analyzer: new package (2023.08.14) --- contrib/rust-analyzer/template.py | 20 ++++++++++++++++++++ contrib/rust-analyzer/update.py | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 contrib/rust-analyzer/template.py create mode 100644 contrib/rust-analyzer/update.py diff --git a/contrib/rust-analyzer/template.py b/contrib/rust-analyzer/template.py new file mode 100644 index 0000000000..639272d343 --- /dev/null +++ b/contrib/rust-analyzer/template.py @@ -0,0 +1,20 @@ +pkgname = "rust-analyzer" +pkgver = "2023.08.14" +pkgrel = 0 +build_style = "cargo" +hostmakedepends = ["cargo"] +makedepends = ["rust"] +pkgdesc = "Rust compiler LSP server" +maintainer = "psykose " +license = "Apache-2.0 OR MIT" +url = "https://github.com/rust-lang/rust-analyzer" +source = f"{url}/archive/refs/tags/{pkgver.replace('.', '-')}.tar.gz" +sha256 = "3fa6d28ece1f8952c29a375aab41e50502d20c8a9c0c5f1e44a9576d8f635224" +# invokes rustfmt via rustup arg, also take longer to build than the actual +# build.. +options = ["!check"] + + +def do_install(self): + self.cargo.install(wrksrc="crates/rust-analyzer") + self.install_license("LICENSE-MIT") diff --git a/contrib/rust-analyzer/update.py b/contrib/rust-analyzer/update.py new file mode 100644 index 0000000000..e8461a665d --- /dev/null +++ b/contrib/rust-analyzer/update.py @@ -0,0 +1,3 @@ +url = "https://api.github.com/repos/rust-lang/rust-analyzer/git/refs/tags" +pattern = r"refs/tags/(\d+\-\d+\-\d+)" +ignore = ["nightly"]