diff options
author | Wind He | 2025-01-22 00:17:48 +0800 |
---|---|---|
committer | Wind He | 2025-01-22 00:17:48 +0800 |
commit | e489d1234c8fb4c5bf8526068106920cdf232639 (patch) | |
tree | 08766e0f724a194a2f15c71927014f1698c0964f | |
download | aur-e489d1234c8fb4c5bf8526068106920cdf232639.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 47 |
2 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6590eda75e37 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = fish-lsp + pkgdesc = LSP implementation for the fish shell language + pkgver = 1.0.8_3 + pkgrel = 1 + url = https://github.com/ndonfris/fish-lsp + arch = x86_64 + license = MIT + makedepends = git + makedepends = yarn + depends = fish + depends = nodejs + depends = python + provides = fish-lsp + conflicts = fish-lsp-git + source = fish-lsp-1.0.8_3.tar.gz::https://github.com/ndonfris/fish-lsp/archive/refs/tags/v1.0.8-3.tar.gz + sha256sums = d84b1be1d0888525438314f6dc04196a3e371f91636c5155e8016d6ffbc3a93c + +pkgname = fish-lsp diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9210ec9c7953 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Heddxh <g311571057 at gmail dot com> +# Contributor: tippfehlr <tippfehlr@tippfehlr.eu> +# Contributor: Chewing_Bever +pkgname=fish-lsp +pkgver=1.0.8_3 +_pkgver=${pkgver//_/-} +pkgrel=1 +pkgdesc="LSP implementation for the fish shell language" +# tree-sitter contains compiled files +arch=('x86_64') +url="https://github.com/ndonfris/fish-lsp" +license=('MIT') +depends=('fish' 'nodejs' 'python') +makedepends=('git' 'yarn') # 'typescript' tsc doesn’t work +provides=($pkgname) +conflicts=(${pkgname}-git) +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${_pkgver}.tar.gz") +sha256sums=('d84b1be1d0888525438314f6dc04196a3e371f91636c5155e8016d6ffbc3a93c') + +prepare() { + cd "${pkgname}-${_pkgver}" + yarn --frozen-lockfile --ignore-scripts +} + +build() { + cd "${pkgname}-${_pkgver}" + ./node_modules/.bin/tsc + ./bin/fish-lsp complete >./fish-lsp.fish +} + +package() { + cd "${pkgname}-${_pkgver}" + mkdir -p "$pkgdir/usr/bin" + mkdir -p "$pkgdir/usr/lib/node_modules/fish-lsp" + + rm -r node_modules/@types + cp -r node_modules out package.json fish_files "$pkgdir/usr/lib/node_modules/fish-lsp" + # nvim-lspconfig doesn’t work without this symlink + ln -s /usr/lib/node_modules/fish-lsp/node_modules/@esdmr/tree-sitter-fish/tree-sitter-fish.wasm \ + "$pkgdir/usr/lib/node_modules/fish-lsp/" + + printf "%s\n" "#!/usr/bin/env node" "require('/usr/lib/node_modules/fish-lsp/out/cli');" >"$pkgdir/usr/bin/fish-lsp" + chmod 755 "$pkgdir/usr/bin/fish-lsp" + + install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 "fish-lsp.fish" "$pkgdir/usr/share/fish/vendor_completions.d/fish-lsp.fish" +} |