blob: f2c0226ef00da88b5d5cbf606a9ce7d245ecaa40 (
plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# Maintainer: Alejandro Osornio <aoxo.contact@gmail.com>
pkgname=tinymist-git
_pkgname=tinymist
pkgver=v0.11.19.r4.g1295c87
pkgrel=1
pkgdesc="An integrated language service for Typst"
arch=('any')
url="https://github.com/Myriad-Dreamin/tinymist"
license=('Apache-2.0')
options=('strip' '!lto' '!debug')
provides=('tinymist')
conflicts=('tinymist-bin')
depends=('gcc-libs' 'glibc')
makedepends=('cargo' 'cargo-insta' 'git')
source=("git+https://github.com/Myriad-Dreamin/${_pkgname}")
sha256sums=('SKIP')
pkgver() {
cd "${_pkgname}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
_srcenv() {
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
}
prepare() {
_srcenv
cd "${_pkgname}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
_srcenv
cd "${_pkgname}"
cargo build --frozen --bin tinymist --release
}
check() {
_srcenv
cd "${_pkgname}"
# See https://github.com/Myriad-Dreamin/tinymist/blob/main/CONTRIBUTING.md
cargo insta test -p tinymist-query --accept
./scripts/e2e.sh
}
package() {
cd "${_pkgname}"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$_pkgname"
}
|