biri-altinstall-git
CLEAN
maintainer Ammonium
0 votes
scanned 2026-09-26 00:12:15.973514
Triggered rules
Clean
AI review downgraded a static finding
llm_review
The static rules flagged this LOW, but an AI model (qwen/qwen3-235b-a22b-2507) reviewed the full PKGBUILD and judged it CLEAN (confidence 95%): The package builds from a public git repository fork, applies transparent source renames for coexistence, and installs compiled binaries and data files; no remote code execution, obfuscation, or untrusted prebuilt payloads are involved.
1 higher static finding superseded - not the current verdict (shown for transparency)
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: Ammonium <diego.garcia.cr@gmail.com>
2
## This is a modified version of the original PKGBUILD for niri-git,
3
## Made to build from the barrulus/biri fork as an "alt install" that can coexist
4
## with niri: binaries, session files and config dir are all named biri.
5
## Credit to the original PKGBUILD code goes to their maintainers (see below)
6
7
# Maintainer: cosmo <aur@dawnson.is>
8
# Maintainer: FreeFull <jazz2rulez@gmail.com>
9
# Contributor: Julius Michaelis <gitter@liftm.de.de>
10
# Contributor: Nebulosa <nebulosa2007-at-yandex-dot-ru>
11
12
## The following variable can be customized at build time.
13
## Use env or export to change at your wish
14
##
15
## Example: env _sccache=y makepkg -sc
16
##
17
## Default is: None => not use sccache
18
##
19
## More info: https://github.com/mozilla/sccache
20
: ${_sccache:=}
21
22
pkgname=biri-altinstall-git
23
_srcname=biri
24
pkgver=26.04.r517.g7ba4192
25
pkgrel=1
26
pkgdesc="Niri compositor soft-fork with several added quality of life features (installed as biri, alongside niri)"
27
arch=(x86_64 aarch64)
28
url="https://github.com/barrulus/${_srcname}"
29
license=(GPL-3.0-or-later)
30
depends=(cairo glib2 libdisplay-info libinput libpipewire libxkbcommon mesa pango pixman seatd)
31
makedepends=(clang rust git)
32
[[ -n "${_sccache}" ]] && makedepends+=(sccache)
33
optdepends=('fuzzel: application launcher similar to rofi drun mode'
34
'waybar: highly customizable Wayland bar'
35
'alacritty: a cross-platform OpenGL terminal emulator'
36
'mako: notification daemon for Wayland'
37
'swaybg: wallpaper tool for Wayland compositors'
38
'swaylock: screen locker for Wayland'
39
'xdg-desktop-portal-gtk: implements most of the basic functionality'
40
'xdg-desktop-portal-gnome: screencasting support'
41
'gnome-keyring: implements the secret portal, for certain apps to work'
42
'polkit-gnome: when apps need to ask for root permissions')
43
provides=("biri=${pkgver}")
44
conflicts=("biri")
45
options=(!debug !lto !strip)
46
source=("${_srcname}::git+$url.git")
47
b2sums=('SKIP')
48
49
pkgver() {
50
cd "${_srcname}"
51
# This fork doesn't push tags to its own remote, but its history is a
52
# direct continuation of upstream niri's, so pull niri's tags in to
53
# describe against instead.
54
git remote get-url upstream &>/dev/null || git remote add upstream "https://github.com/niri-wm/niri.git"
55
# Don't abort in offline/network-isolated builds
56
# where the tags are already cached from a previous fetch.
57
git fetch -q upstream 'refs/tags/*:refs/tags/*' 2>/dev/null || true
58
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
59
}
60
61
prepare() {
62
cd "${_srcname}"
63
# Tuning cargo
64
export CARGO_HOME="${srcdir}/${_srcname}/.cargo" # Download all to src directory, not in ~/.cargo
65
66
# Rename everything user-visible from niri to biri so this can be installed
67
# next to a regular niri. The IPC protocol and NIRI_* env vars are unchanged.
68
sed -i \
69
-e 's|ProjectDirs::from("", "", "niri")|ProjectDirs::from("", "", "biri")|' \
70
-e 's|"/etc/niri/config.kdl"|"/etc/biri/config.kdl"|' \
71
-e 's|env::set_var("XDG_CURRENT_DESKTOP", "niri")|env::set_var("XDG_CURRENT_DESKTOP", "biri:niri")|' \
72
-e 's|^\( *\)"niri",$|\1"biri",|' \
73
src/main.rs
74
sed -i 's|\$XDG_CONFIG_HOME/niri/config.kdl|$XDG_CONFIG_HOME/biri/config.kdl|' src/cli.rs
75
sed -i 's|~/\.config/niri/|~/.config/biri/|g' resources/default-config.kdl
76
sed -i 's|\${NIRI:-niri}|${NIRI:-biri}|' resources/shaders/scripts/*
77
78
sed -i 's/\bniri\b/biri/g' resources/niri-session resources/niri.service resources/niri-shutdown.target
79
sed -i \
80
-e 's|^ExecStart=biri |ExecStart=/usr/bin/biri |' \
81
resources/niri.service
82
sed -i \
83
-e 's|^Name=Niri$|Name=Biri|' \
84
-e 's|^Exec=niri-session$|Exec=biri-session|' \
85
-e 's|^DesktopNames=niri$|DesktopNames=biri;niri|' \
86
resources/niri.desktop
87
88
# Fail loudly if upstream changed and a substitution silently missed.
89
grep -qF 'ProjectDirs::from("", "", "biri")' src/main.rs
90
grep -qF '"/etc/biri/config.kdl"' src/main.rs
91
grep -qF '"XDG_CURRENT_DESKTOP", "biri:niri"' src/main.rs
92
grep -qE '^ *"niri",$' src/main.rs && return 1
93
grep -qF 'exec biri --session' resources/niri-session
94
grep -qF 'niri.service' resources/niri-session && return 1
95
grep -qxF 'ExecStart=/usr/bin/biri --session' resources/niri.service
96
grep -qxF 'Exec=biri-session' resources/niri.desktop
97
98
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
99
}
100
101
build() {
102
cd "${_srcname}"
103
104
# Tuning rust compiler
105
[[ -n "${_sccache}" ]] && export RUSTC_WRAPPER=sccache # If $_sccache not empty, build using binary cache
106
107
# Tuning cargo
108
export CARGO_HOME="${srcdir}/${_srcname}/.cargo" # Use downloaded earlier from src directory, not from ~/.cargo
109
export CARGO_TARGET_DIR=target # Place the output in target relative to the current directory
110
111
cargo build --frozen --release
112
}
113
114
package() {
115
cd "${_srcname}"
116
install -Dm755 target/release/niri "${pkgdir}/usr/bin/biri"
117
install -Dm755 resources/niri-session "${pkgdir}/usr/bin/biri-session"
118
install -Dm644 resources/default-config.kdl -t "${pkgdir}/usr/share/doc/biri"
119
install -Dm644 resources/niri.desktop "${pkgdir}/usr/share/wayland-sessions/biri.desktop"
120
install -Dm644 resources/niri-portals.conf "${pkgdir}/usr/share/xdg-desktop-portal/biri-portals.conf"
121
install -Dm644 resources/niri.service "${pkgdir}/usr/lib/systemd/user/biri.service"
122
install -Dm644 resources/niri-shutdown.target "${pkgdir}/usr/lib/systemd/user/biri-shutdown.target"
123
124
# Bundle the shader collection so users have a local copy to seed
125
# ~/.config/biri/ from (see resources/shaders/README.md).
126
local shaderdir="${pkgdir}/usr/share/doc/biri/shaders"
127
cp -r resources/shaders "${shaderdir}"
128
find "${shaderdir}" -type d -exec chmod 755 {} +
129
find "${shaderdir}" -type f -exec chmod 644 {} +
130
chmod 755 "${shaderdir}"/scripts/*
131
}
132
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-26 00:12:15 | Clean | 2 |
| 2026-09-25 23:13:47 | Low | 1 |