tformula
LOW
maintainer nothing_glows
0 votes
scanned 2026-08-27 05:31:50.628779
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: nothing_glows <wppopqpu@outlook.com>
2
pkgname=tformula
3
_pkgname=$pkgname
4
pkgver=0.3.1
5
pkgrel=1
6
pkgdesc='Render LaTeX and read Markdown with images directly in the terminal'
7
arch=('x86_64' 'aarch64')
8
url='https://github.com/mikewang817/TFormula'
9
license=('MIT')
10
options=('!debug')
11
depends=('nodejs>=20')
12
makedepends=('npm' 'jq' 'node-gyp' 'python')
13
source=("https://registry.npmjs.org/$_pkgname/-/$_pkgname-$pkgver.tgz")
14
noextract=("$_pkgname-$pkgver.tgz")
15
sha256sums=('d15c8d3cc239438a696a499f31338fc7315bae72edd41fecca0a661d56c0ed0e')
16
17
package() {
18
npm install -g --prefix "$pkgdir/usr" \
19
--cache "$srcdir/npm-cache" \
20
--no-audit --no-fund \
21
--allow-scripts=node-pty,sharp \
22
"$srcdir/$_pkgname-$pkgver.tgz"
23
24
# These are upstream build-time sources and scripts, not needed at runtime.
25
rm -rf "$pkgdir/usr/lib/node_modules/$_pkgname/node_modules/katex/src" \
26
"$pkgdir/usr/lib/node_modules/$_pkgname/node_modules/node-pty/deps"
27
28
# node-pty only loads build/Release/pty.node at runtime. Remove node-gyp's
29
# build intermediates, which retain absolute paths to the build root.
30
local nodepty="$pkgdir/usr/lib/node_modules/$_pkgname/node_modules/node-pty"
31
find "$nodepty/build" -type f ! -path "$nodepty/build/Release/pty.node" -delete
32
find "$nodepty/build" -depth -type d -empty -delete
33
34
find "$pkgdir/usr/lib/node_modules" -name package.json -print0 |
35
xargs -r -0 sed -i '/"_where"/d'
36
37
local pkgjson="$pkgdir/usr/lib/node_modules/$_pkgname/package.json"
38
local tmpjson
39
tmpjson=$(mktemp)
40
jq '. |= with_entries(select(.key | test("^_.+") | not))' "$pkgjson" > "$tmpjson"
41
mv "$tmpjson" "$pkgjson"
42
chmod 644 "$pkgjson"
43
44
install -Dm644 "$pkgdir/usr/lib/node_modules/$_pkgname/LICENSE" \
45
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
46
chown -R root:root "$pkgdir"
47
}
48
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-27 05:31:50 | Low | 1 |