summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSainnhepark2020-07-29 20:12:55 +0800
committerSainnhepark2020-07-29 20:12:55 +0800
commitd1d1e17696dab2b6c5bfdad8e6079a3318e2d3b9 (patch)
treeee17383e7fafd5131afc6b5eeab7dac4780d8d7c
downloadaur-d1d1e17696dab2b6c5bfdad8e6079a3318e2d3b9.tar.gz
init
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD49
-rw-r--r--serverPath.patch12
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..94b2fef0c0d9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = neovim-coc-rust-analyzer-git
+ pkgdesc = rust-analyzer extension for coc.nvim
+ pkgver = r464.4b3847f
+ pkgrel = 1
+ url = https://github.com/fannheyward/coc-rust-analyzer
+ arch = any
+ license =
+ makedepends = yarn
+ makedepends = npm
+ makedepends = git
+ depends = neovim-coc
+ depends = rust-analyzer
+ provides = neovim-coc-rust-analyzer
+ conflicts = neovim-coc-rust-analyzer
+ source = coc-rust-analyzer::git+https://github.com/fannheyward/coc-rust-analyzer.git
+ source = serverPath.patch
+ sha256sums = SKIP
+ sha256sums = 88ba4cda5fb8729d653918a6d9d05161529ba21c7449e08a83507d47f8bcb64d
+
+pkgname = neovim-coc-rust-analyzer-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cf5c7c060682
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Sainnhe Park <sainnhe@gmail.com>
+_variant='neovim'
+_extname=coc-rust-analyzer
+_packdir="usr/local/share/nvim/site/pack/coc/start/${_extname}"
+url='https://github.com/fannheyward/coc-rust-analyzer'
+pkgdesc='rust-analyzer extension for coc.nvim'
+
+pkgname="${_variant}-${_extname}-git"
+provides=("${_variant}-${_extname}")
+conflicts=("${_variant}-${_extname}")
+arch=('any')
+depends=("${_variant}-coc" 'rust-analyzer')
+makedepends=('yarn' 'npm' 'git')
+license=('')
+source=("${_extname}::git+${url}.git"
+ 'serverPath.patch')
+pkgver=r464.4b3847f
+pkgrel=1
+sha256sums=('SKIP'
+ '88ba4cda5fb8729d653918a6d9d05161529ba21c7449e08a83507d47f8bcb64d')
+
+pkgver() {
+ cd "${srcdir}/${_extname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "${srcdir}/${_extname}"
+ patch --forward --strip=1 --input="${srcdir}/serverPath.patch"
+}
+
+build() {
+ cd "${srcdir}/${_extname}"
+ yarn install --frozen-lockfile
+ yarn pack
+ tar xvf *.tgz
+ rm *.tgz
+ cd package
+ npm install --only=production --no-lockfile --ignore-scripts
+}
+
+package() {
+ cd "${srcdir}/${_extname}/package"
+ find . -type f -exec \
+ install -Dm 644 '{}' "${pkgdir}/${_packdir}/{}" \;
+ rm -rf "${srcdir}/${_extname}/package"
+ cd ../
+ git checkout -- package.json
+}
diff --git a/serverPath.patch b/serverPath.patch
new file mode 100644
index 000000000000..2113042cbae0
--- /dev/null
+++ b/serverPath.patch
@@ -0,0 +1,12 @@
+diff --unified --recursive --text coc-rust-analyzer/package.json coc-rust-analyzer-new/package.json
+--- coc-rust-analyzer/package.json 2020-07-29 19:53:32.686164417 +0800
++++ coc-rust-analyzer-new/package.json 2020-07-29 19:56:44.159484977 +0800
+@@ -281,7 +281,7 @@
+ "null",
+ "string"
+ ],
+- "default": null,
++ "default": "rust-analyzer",
+ "description": "Path to rust-analyzer executable (points to bundled binary by default). If this is set, then \"rust-analyzer.updates.channel\" setting is not used"
+ },
+ "rust-analyzer.linkedProjects": {