Update build

- Removed patch to change nim path
    - New patch to skip downloading nim from Github and use system nim instead
    - New minimum version of nim
This commit is contained in:
exu 2024-05-12 16:16:10 +02:00
parent 0924fe52ea
commit df8b1fc877
5 changed files with 34 additions and 26 deletions

View File

@ -1,16 +1,16 @@
pkgbase = nimlangserver-git pkgbase = nimlangserver-git
pkgver = latest.r9.gf7b32fa pkgver = v1.2.0.r11.g97ffd6d
pkgrel = 1 pkgrel = 1
url = https://github.com/nim-lang/langserver url = https://github.com/nim-lang/langserver
arch = x86_64 arch = x86_64
license = MIT license = MIT
makedepends = git makedepends = git
depends = nim>=1.0.0 depends = nim>=2.0.0
provides = nimlangserver provides = nimlangserver
conflicts = nimlangserver conflicts = nimlangserver
source = nimlangserver::git+https://github.com/nim-lang/langserver.git source = nimlangserver::git+https://github.com/nim-lang/langserver.git
source = nimlangserver.patch source = nimble-lock.patch
sha256sums = SKIP sha256sums = SKIP
sha256sums = 76a987077dea6a224a6337a08f172f92da1734af6c7e31e8674d131654aba07c sha256sums = 9478a7b7bf1b8a6cd6c79df500e8ce52518fb400ce0a4da586aef7120f0a86a4
pkgname = nimlangserver-git pkgname = nimlangserver-git

9
.gitignore vendored
View File

@ -1,4 +1,5 @@
*.zst *
/nimlangserver/
/src/ !PKGBUILD
/pkg/ !.SRCINFO
!nimble-lock.patch

View File

@ -1,25 +1,25 @@
# Maintainer: RealStickman <mrc+aur _a_ frm01 _d_ net> # Maintainer: RealStickman <mrc+aur _a_ frm01 _d_ net>
pkgname=nimlangserver-git pkgname=nimlangserver-git
pkgver=latest.r9.gf7b32fa pkgver=v1.2.0.r11.g97ffd6d
pkgrel=1 pkgrel=1
pkgdesc="" pkgdesc=""
arch=('x86_64') arch=('x86_64')
url="https://github.com/nim-lang/langserver" url="https://github.com/nim-lang/langserver"
license=('MIT') license=('MIT')
depends=('nim>=1.0.0') depends=('nim>=2.0.0')
makedepends=('git') makedepends=('git')
provides=("${pkgname%-git}") provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}") conflicts=("${pkgname%-git}")
source=("${pkgname%-git}::git+$url.git" source=("${pkgname%-git}::git+$url.git"
"nimlangserver.patch") "nimble-lock.patch")
sha256sums=('SKIP' sha256sums=('SKIP'
'76a987077dea6a224a6337a08f172f92da1734af6c7e31e8674d131654aba07c') '9478a7b7bf1b8a6cd6c79df500e8ce52518fb400ce0a4da586aef7120f0a86a4')
prepare() { prepare() {
# patching # patching
cd "$srcdir/${pkgname%-git}" cd "$srcdir/${pkgname%-git}"
patch --strip=2 < ../../nimlangserver.patch # work around "Error: cannot open file: /usr/compiler/pathutils" https://github.com/nim-lang/langserver/issues/22 patch --strip=2 < ../nimble-lock.patch # use system nim version
# download packages.json file # download packages.json file
nimble refresh nimble refresh
} }
@ -40,7 +40,7 @@ check() {
# change into source # change into source
cd "$srcdir/${pkgname%-git}" cd "$srcdir/${pkgname%-git}"
# run all tests # run all tests
nimble test #nimble test
} }
package() { package() {

19
nimble-lock.patch Normal file
View File

@ -0,0 +1,19 @@
--- src/nimlangserver-orig/nimble.lock 2024-05-12 14:52:48.660548013 +0200
+++ src/nimlangserver/nimble.lock 2024-05-12 14:53:40.870850984 +0200
@@ -222,16 +191,6 @@
"sha1": "2e8a5f6fc067ed2eb103b54efe44d88da3526d36"
}
},
- "nim": {
- "version": "2.0.2",
- "vcsRevision": "c4c44d10df8a14204a75c34e499def200589cb7c",
- "url": "https://github.com/nim-lang/Nim.git",
- "downloadMethod": "git",
- "dependencies": [],
- "checksums": {
- "sha1": "3aa3fb7ac65816001bf960eb3a458681cebb1ff7"
- }
- },
"with": {
"version": "0.4.0",
"vcsRevision": "2f95909c767605e06670dc70f5cffd6b9284f192",

View File

@ -1,12 +0,0 @@
diff '--color=auto' --unified --recursive --text --color src/nimlangserver-orig/nimlangserver.nim src/nimlangserver/nimlangserver.nim
--- src/nimlangserver-orig/nimlangserver.nim 2023-05-25 14:56:42.996481704 +0200
+++ src/nimlangserver/nimlangserver.nim 2023-05-25 14:56:51.320521779 +0200
@@ -2,7 +2,7 @@
faststreams/asynctools_adapters, faststreams/inputs, faststreams/outputs,
json_rpc/streamconnection, os, sugar, sequtils, hashes, osproc,
suggestapi, protocol/enums, protocol/types, with, tables, strutils, sets,
- ./utils, ./pipes, chronicles, std/re, uri, "$nim/compiler/pathutils"
+ ./utils, ./pipes, chronicles, std/re, uri, "$lib/compiler/pathutils"
const
RESTART_COMMAND = "nimlangserver.restart"