summaryrefslogtreecommitdiff
path: root/experimental/nim/APKBUILD
blob: c64968b44237bd72bfa4c258e0596e87294a3b7d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=nim
pkgver=0.20.0
pkgrel=0
pkgdesc="Statically typed, compiled systems programming language"
url="https://nim-lang.org/"
arch="all"
license=" "
depends=""
checkdepends="gc node"
makedepends="openssl-dev pcre-dev"
subpackages="$pkgname-doc"
source="https://nim-lang.org/download/nim-$pkgver.tar.xz"

build() {
	sh build.sh
	bin/nim --parallelBuild:${JOBS} c koch
	./koch boot --parallelBuild:${JOBS} -d:release
	PATH="./bin:$PATH" ./koch --stable tools
}

check() {
	PATH="./bin:$PATH" ./koch test
}

package() {
	PATH="./bin:$PATH" ./koch install "$pkgdir"
	mkdir -p "$pkgdir"/usr/share/doc
	mv "$pkgdir"/usr/share/nim/doc "$pkgdir"/usr/share/doc/nim

	for _exec in bin/*; do
		install -m755 _exec "$pkgdir"/usr/bin/
	done
}

sha512sums="e41fc9f9337535d07ebdd14ae8195bf9c666a0a242516f24d50241e69d50e89fcb9ac1a0b1fbeee0bc75b0218aeb18698ff2ac87447005dad52dc18da80bb02d  nim-0.20.0.tar.xz"