2023-05-20 16:31:51 +02:00
|
|
|
# Maintainer: RealStickman <mrc+aur _a_ frm01 _d_ net>
|
|
|
|
|
|
|
|
pkgname=nimlangserver-git
|
2024-05-12 16:16:10 +02:00
|
|
|
pkgver=v1.2.0.r11.g97ffd6d
|
2023-05-20 16:31:51 +02:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc=""
|
|
|
|
arch=('x86_64')
|
|
|
|
url="https://github.com/nim-lang/langserver"
|
|
|
|
license=('MIT')
|
2024-05-12 16:16:10 +02:00
|
|
|
depends=('nim>=2.0.0')
|
2023-05-20 16:31:51 +02:00
|
|
|
makedepends=('git')
|
|
|
|
provides=("${pkgname%-git}")
|
|
|
|
conflicts=("${pkgname%-git}")
|
|
|
|
source=("${pkgname%-git}::git+$url.git"
|
2024-05-12 16:16:10 +02:00
|
|
|
"nimble-lock.patch")
|
2023-05-20 16:31:51 +02:00
|
|
|
sha256sums=('SKIP'
|
2024-05-12 16:16:10 +02:00
|
|
|
'9478a7b7bf1b8a6cd6c79df500e8ce52518fb400ce0a4da586aef7120f0a86a4')
|
2023-05-20 16:31:51 +02:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
# patching
|
|
|
|
cd "$srcdir/${pkgname%-git}"
|
2024-05-12 16:16:10 +02:00
|
|
|
patch --strip=2 < ../nimble-lock.patch # use system nim version
|
2023-05-20 16:31:51 +02:00
|
|
|
# download packages.json file
|
|
|
|
nimble refresh
|
|
|
|
}
|
|
|
|
|
|
|
|
pkgver() {
|
|
|
|
cd "$srcdir/${pkgname%-git}"
|
|
|
|
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
# change into source
|
|
|
|
cd "$srcdir/${pkgname%-git}"
|
|
|
|
# compile program
|
|
|
|
nimble build
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
# change into source
|
|
|
|
cd "$srcdir/${pkgname%-git}"
|
|
|
|
# run all tests
|
2024-05-12 16:16:10 +02:00
|
|
|
#nimble test
|
2023-05-20 16:31:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
# create our target filestructure
|
|
|
|
mkdir -p "$pkgdir/usr/bin"
|
|
|
|
# copy executable
|
|
|
|
install -Dm755 "$srcdir/${pkgname%-git}/${pkgname%-git}" "$pkgdir/usr/bin/${pkgname%-git}"
|
|
|
|
}
|