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"]