diff options
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rwxr-xr-x | patch.py | 13 |
3 files changed, 27 insertions, 7 deletions
@@ -1,17 +1,21 @@ pkgbase = neovim-coc-go-git pkgdesc = Go language server extension using gopls for coc.nvim - pkgver = 0.9.2.r2.g6d13daa + pkgver = 1.3.24.r2.g4e401fa pkgrel = 1 url = https://github.com/josa42/coc-go arch = any license = MIT makedepends = yarn + makedepends = npm makedepends = git + makedepends = python depends = neovim-coc + depends = gopls provides = neovim-coc-go conflicts = neovim-coc-go source = coc-go::git+https://github.com/josa42/coc-go.git + source = patch.py sha256sums = SKIP + sha256sums = 64ec60c5df767e4fc0a005c72077a2954183837381efcec2a223abfc3790b0a2 pkgname = neovim-coc-go-git - @@ -9,13 +9,15 @@ pkgname="${_variant}-${_extname}-git" provides=("${_variant}-${_extname}") conflicts=("${_variant}-${_extname}") arch=('any') -depends=("${_variant}-coc") -makedepends=('yarn' 'git') +depends=("${_variant}-coc" 'gopls') +makedepends=('yarn' 'npm' 'git' 'python') license=('MIT') -source=("${_extname}::git+${url}.git") -pkgver=0.9.2.r2.g6d13daa +source=("${_extname}::git+${url}.git" + "patch.py") +pkgver=1.3.24.r2.g4e401fa pkgrel=1 -sha256sums=('SKIP') +sha256sums=('SKIP' + '64ec60c5df767e4fc0a005c72077a2954183837381efcec2a223abfc3790b0a2') pkgver() { cd "${srcdir}/${_extname}" @@ -39,5 +41,6 @@ package() { install -Dm 644 '{}' "${pkgdir}/${_packdir}/{}" \; rm -rf "${srcdir}/${_extname}/package" find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d' + "$srcdir/patch.py" "$pkgdir/$_packdir/package.json" chown -R root:root "${pkgdir}" } diff --git a/patch.py b/patch.py new file mode 100755 index 000000000000..80c612ea86f2 --- /dev/null +++ b/patch.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import sys +import json +import os + +file_path = sys.argv[1] + +with open(file_path, "r") as rfile: + data = json.load(rfile) +data["contributes"]["configuration"]["properties"]["go.goplsPath"]["default"] = "/usr/bin/gopls" +with open(file_path, "w") as wfile: + json.dump(data, wfile, indent='\t') |