| 1 | # Contributor: lauren n. liberda <[email protected]> |
| 2 | maintainer="lauren n. liberda <[email protected]>" |
| 3 | pkgname=tinymist |
| 4 | pkgver=0.15.0 |
| 5 | pkgrel=0 |
| 6 | pkgdesc="Language service for Typst" |
| 7 | url="https://github.com/Myriad-Dreamin/tinymist" |
| 8 | # armhf, armv7: failing tests |
| 9 | # riscv64: failing test - triggers panic in rust libcore |
| 10 | # s390x: failing tests - looks like endianness |
| 11 | # x86: failing asserts in reflexo crate |
| 12 | arch="all !armhf !armv7 !riscv64 !s390x !x86" |
| 13 | license="Apache-2.0" |
| 14 | makedepends=" |
| 15 | cargo |
| 16 | cargo-auditable |
| 17 | openssl-dev |
| 18 | " |
| 19 | checkdepends="cage-run" |
| 20 | subpackages="typlite:_typlite" |
| 21 | source=" |
| 22 | https://github.com/Myriad-Dreamin/tinymist/archive/v$pkgver/tinymist-$pkgver.tar.gz |
| 23 | " |
| 24 | |
| 25 | export OPENSSL_NO_VENDOR=1 |
| 26 | export PKG_CONFIG_ALL_DYNAMIC=1 |
| 27 | |
| 28 | prepare() { |
| 29 | default_prepare |
| 30 | |
| 31 | cargo fetch --target="$CTARGET" --locked |
| 32 | } |
| 33 | |
| 34 | build() { |
| 35 | cargo auditable build --frozen --release -p tinymist-cli |
| 36 | cargo auditable build --frozen --release -p typlite -F cli --bin typlite |
| 37 | } |
| 38 | |
| 39 | check() { |
| 40 | # tests package is e2e tests. they don't simply work. |
| 41 | cage-run cargo test --frozen --workspace --exclude tests |
| 42 | } |
| 43 | |
| 44 | package() { |
| 45 | install -Dm755 target/release/tinymist target/release/typlite -t "$pkgdir"/usr/bin/ |
| 46 | } |
| 47 | |
| 48 | _typlite() { |
| 49 | pkgdesc="CLI tool to convert a subset of Typst to Markdown" |
| 50 | amove usr/bin/typlite |
| 51 | } |
| 52 | |
| 53 | sha512sums=" |
| 54 | 4ffbb1bdb690a6ab8742bb4dca1660ef778242c660ad53bbdff5726db2699caf40d17f7fa8dc50d8ef68bf425ad5c02a6328a081532967f816674c3d60a92ab2 tinymist-0.15.0.tar.gz |
| 55 | " |