tformula

LOW
maintainer nothing_glows 0 votes scanned 2026-08-27 05:31:50.628779
View on AUR
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>
2pkgname=tformula
3_pkgname=$pkgname
4pkgver=0.3.1
5pkgrel=1
6pkgdesc='Render LaTeX and read Markdown with images directly in the terminal'
7arch=('x86_64' 'aarch64')
8url='https://github.com/mikewang817/TFormula'
9license=('MIT')
10options=('!debug')
11depends=('nodejs>=20')
12makedepends=('npm' 'jq' 'node-gyp' 'python')
13source=("https://registry.npmjs.org/$_pkgname/-/$_pkgname-$pkgver.tgz")
14noextract=("$_pkgname-$pkgver.tgz")
15sha256sums=('d15c8d3cc239438a696a499f31338fc7315bae72edd41fecca0a661d56c0ed0e')
16
17package() {
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)SeverityRules
2026-08-27 05:31:50 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion