mantle-git
LOW
maintainer anasgets111
0 votes
scanned 2026-09-19 03:30:07.586967
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: Anas Khalifa <anasgets111@gmail.com>
2
3
# `.SRCINFO` beside this file is generated, and the AUR rejects a push whose .SRCINFO disagrees
4
# with the PKGBUILD: run `makepkg --printsrcinfo > .SRCINFO` in the same commit as any edit here.
5
pkgname=mantle-git
6
pkgver=r679.ge338801
7
pkgrel=1
8
pkgdesc='A Wayland shell engine that runs shells written in Lua'
9
arch=('x86_64')
10
url='https://github.com/anasgets111/mantle'
11
license=('MIT')
12
# One entry per NEEDED line in the two binaries, plus the three programs they spawn: fc-match and
13
# fc-list (`renderer/src/text/fonts.rs`), pkexec (the updates install command).
14
#
15
# `pacman` covers libalpm.so.16 and the upgrade command both. It is a soname dependency with no
16
# soname in it, so a pacman that bumps libalpm needs this rebuilt and nothing here says so. Add
17
# `libalpm.so=16-64` when that ABI is worth pinning.
18
depends=('fontconfig' 'gcc-libs' 'glibc' 'libglvnd' 'libpipewire' 'libxkbcommon' 'pacman'
19
'pam' 'polkit' 'systemd-libs' 'wayland')
20
# clang: pipewire-sys and libspa-sys run bindgen.
21
makedepends=('cargo' 'clang' 'git')
22
# A clean chroot has fontconfig but no font *files*, and 98 renderer tests shape real text through
23
# it. `DEFAULT_CHAIN` opens with the generic "sans-serif", so any installed family satisfies them;
24
# dejavu is the smallest that also carries bold, italic and an RTL script.
25
checkdepends=('ttf-dejavu')
26
# Not a hard dependency: `run_sound_player` logs the decode failure and carries on, so a missing
27
# theme costs notification sounds and nothing else.
28
optdepends=('niri: workspaces and keyboard layout'
29
'hyprland: workspaces and keyboard layout'
30
'sound-theme-freedesktop: notification sounds'
31
'lua-language-server: type-checking the config in an editor')
32
provides=("mantle=$pkgver")
33
conflicts=('mantle')
34
backup=('etc/pam.d/mantle')
35
# `[profile.release]` sets `strip = true`, so the default `debug` option would split a debug package
36
# out of binaries that carry nothing.
37
#
38
# `!lto` is not a preference: makepkg's `lto` puts `-flto=auto` in CFLAGS, mlua's `vendored` feature
39
# compiles Lua through the `cc` crate with it, and the archive then holds GCC LTO bitcode with empty
40
# `.text`. rustc links it without GCC's plugin, so every `lua_*` comes back undefined. Nothing is
41
# given up: `[profile.release]` already sets `lto = true`, which is the LTO that matters here.
42
options=('!debug' '!lto')
43
source=("$pkgname::git+$url.git")
44
sha256sums=('SKIP')
45
46
# No tags yet, and Cargo.toml's 0.1.0 is a placeholder its own comment says not to bump, so the
47
# commit count is the only number that moves. `git describe` takes over from the first tag. if/else
48
# rather than `describe | sed || printf`: a pipeline exits with sed's status, so that `||` is dead
49
# and pkgver comes back empty.
50
pkgver() {
51
cd "$pkgname"
52
local described
53
if described=$(git describe --long --tags 2>/dev/null); then
54
sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' <<<"$described"
55
else
56
printf 'r%s.g%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
57
fi
58
}
59
60
prepare() {
61
cd "$pkgname"
62
cargo fetch --locked --target "$(rustc -vV | sed -n 's/^host: //p')"
63
}
64
65
# RUSTUP_TOOLCHAIN because a maintainer running makepkg outside a chroot has rustup, whose default
66
# toolchain is whatever they last set. A clean chroot has the `rust` package and ignores this.
67
build() {
68
cd "$pkgname"
69
export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
70
cargo build --frozen --release --workspace
71
}
72
73
# The only place `overflow-checks` is tested: `just check` runs dev, where it is off, and Cargo.toml
74
# turns it on for release precisely because a wrapped i32 reaching an allocator is the failure worth
75
# catching. Costs a second full compile; `makepkg --nocheck` skips it.
76
check() {
77
cd "$pkgname"
78
export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
79
cargo test --frozen --release --workspace
80
}
81
82
# The Renderer sits in lib/mantle, off $PATH, and bin/mantle is a symlink into it: `current_exe`
83
# reads symlink-resolved /proc/self/exe, so the Supervisor still finds its sibling. One command on
84
# $PATH, and the pair cannot drift apart.
85
#
86
# That layout is load-bearing, not taste: `supervisor/src/setup.rs` derives the stub directory from
87
# the binary's own path, and `lib/mantle/mantle` is what makes it resolve `share/mantle/lua-meta`.
88
# `mantle init` writes a .luarc.json pointing lua-language-server at those files, so they must be on
89
# disk. The starter shell.lua is not -- it is `include_str!`'d into the Supervisor and written into
90
# the user's config dir, so a copy under share/ would be read by nothing.
91
package() {
92
cd "$pkgname"
93
install -Dm755 target/release/mantle "$pkgdir/usr/lib/mantle/mantle"
94
install -Dm755 target/release/mantle-renderer "$pkgdir/usr/lib/mantle/mantle-renderer"
95
install -dm755 "$pkgdir/usr/bin"
96
ln -sfn ../lib/mantle/mantle "$pkgdir/usr/bin/mantle"
97
install -Dm644 -t "$pkgdir/usr/share/mantle/lua-meta" lua-meta/*.lua
98
install -Dm644 packaging/pam.d/mantle "$pkgdir/etc/pam.d/mantle"
99
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
100
}
101
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-19 03:30:07 | Low | 1 |