niri-fx-git

LOW
maintainer jturbide 0 votes scanned 2026-10-06 08:02:16.298752
View on AUR
Why flagged

The package builds from source via git repositories (including a pinned upstream commit), uses standard Python and Rust tooling, and installs only built artifacts and data files; the 'SKIP' checksums are acceptable for VCS sources, and the complex prepare/build steps are part of a legitimate build process for a compositor with patched dependencies.

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.

Low AI review llm_review

An AI model (qwen/qwen3-235b-a22b-2507) reviewed this and agrees it is LOW (confidence 95%): The package builds from source via git repositories (including a pinned upstream commit), uses standard Python and Rust tooling, and installs only built artifacts and data files; the 'SKIP' checksums are acceptable for VCS sources, and the complex prepare/build steps are part of a legitimate build process for a compositor with patched dependencies.

PKGBUILD

1# Maintainer: Julien Turbide <moi at jturbide dot com>
2# SPDX-License-Identifier: 0BSD
3
4pkgname=niri-fx-git
5pkgver=0.22.0.r80.g1e715c7
6provides=("niri-fx=${pkgver%%.r*}")
7conflicts=('niri-fx')
8_niri_revision=8ed0da44d974c32c6877d2f4630c314da0717ecb
9pkgrel=1
10pkgdesc='Complete NiriFX compositor, presets, CLI and visual Studio for Niri'
11arch=('x86_64')
12url='https://github.com/jturbide/niri-fx'
13license=('MIT AND GPL-3.0-or-later AND 0BSD')
14depends=(
15 'niri' 'python' 'hicolor-icon-theme' 'bash' 'systemd' 'dbus'
16 'cairo' 'glib2' 'glibc' 'libdisplay-info' 'libgcc' 'libinput'
17 'libpipewire' 'libxkbcommon' 'mesa' 'pango' 'pixman' 'seatd'
18 'systemd-libs' 'wayland' 'libglvnd'
19)
20makedepends=(
21 'rust' 'clang' 'git' 'python-build' 'python-installer'
22 'python-setuptools>=77' 'python-wheel'
23)
24checkdepends=('desktop-file-utils' 'python-pillow')
25optdepends=(
26 'chromium: open Studio in an app window'
27 'quickshell: optional QML preset picker'
28 'gjs: optional GTK preset picker'
29 'gtk4: optional GTK preset picker'
30 'libadwaita: optional GTK preset picker'
31 'xdg-desktop-portal-gnome: screen-sharing portal for the Niri session'
32 'xdg-desktop-portal-gtk: fallback desktop portal'
33 'org.freedesktop.secrets: secret portal provider'
34 'xwayland-satellite: run X11 applications'
35)
36# The producer strips its executable before recording the final SHA-256.
37# makepkg must not rewrite that executable or create a separate debug package.
38# GCC LTO objects from libspa's C helpers cannot be linked by Rust's LLVM linker;
39# disabling makepkg LTO preserves Rust's own release-profile thin LTO.
40options=('!strip' '!debug' '!lto')
41source=(
42 'niri-fx::git+https://github.com/jturbide/niri-fx.git#branch=main'
43 "niri::git+https://github.com/niri-wm/niri.git#commit=${_niri_revision}"
44 'niri-fx-studio.desktop'
45 'niri-fx-packaged.desktop'
46 'README.Arch'
47 'LICENSE'
48)
49sha256sums=(
50 'SKIP'
51 'SKIP'
52 '7a3f838400c76a9b4e50749c77b8e8b285d34a19c8f716a5f916af04a12ebb34'
53 '4f5b3d3b995d406866385c9b892557e4b3521645a59f4526ca999e93cabfb977'
54 '4ee5a8a05ae700d40b85e97482d41b75cce5d2ae5b9317e4a59f89304f107fa5'
55 '336feffd8a99323d56058efe2b2deb3480dcf935dbb6813324c95a7e61bbbca3'
56)
57
58pkgver() {
59 cd niri-fx || return
60 local _version
61 _version=$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')
62 printf '%s.r%s.g%s' "${_version}" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
63}
64
65prepare() {
66 # makepkg owns this source checkout. Remove earlier wheel/build leftovers so
67 # a repeated build cannot package stale Python modules or multiple wheels.
68 git -C "${srcdir}/niri-fx" clean -dfx
69 # One NiriFX checkout supplies the wheel, patches and native producer. Keep
70 # Cargo state outside the audited upstream Niri tree.
71 python - "${srcdir}/niri-fx" "${srcdir}/niri" "${_niri_revision}" <<'PYTHON'
72import runpy
73import sys
74import tomllib
75from pathlib import Path
76
77repository, source = map(Path, sys.argv[1:3])
78sys.path[:0] = [str(repository / "scripts"), str(repository)]
79from niri_fx import __version__
80from niri_fx.native_build import REVISION, STACKS
81
82version = tomllib.loads((repository / "pyproject.toml").read_text())["project"]["version"]
83if version != __version__:
84 raise SystemExit("NiriFX source version metadata disagrees")
85if len(sys.argv) == 5 and version != sys.argv[4]:
86 raise SystemExit("Release tag metadata differs from the recipe version")
87if REVISION != sys.argv[3]:
88 raise SystemExit("Recipe upstream revision differs from the canonical NiriFX pin")
89builder = runpy.run_path(str(repository / "scripts/build-niri-movement.py"))
90patches = [repository / "experimental" / name for name in STACKS["fragment"]]
91if len(patches) != 4:
92 raise SystemExit("Review the recipe for a changed full-session patch stack")
93builder["apply_patches"](source, REVISION, patches)
94builder["apply_patches"](source, REVISION, patches, verify_only=True)
95PYTHON
96 CARGO_HOME="${srcdir}/cargo" RUSTUP_AUTO_INSTALL=0 \
97 cargo fetch --locked --manifest-path "${srcdir}/niri/Cargo.toml"
98}
99
100build() {
101 cd niri-fx || return
102 python -m build --wheel --no-isolation
103 # Only replace the generated export; retain native attempts and Cargo cache.
104 rm -rf -- "${srcdir}/session-candidate"
105 # Compilation and all native regressions run offline in a fresh attempt.
106 python scripts/build-nirifx-session.py \
107 --prepared-source "${srcdir}/niri" \
108 --build-root "${srcdir}/attempts" \
109 --cargo-home "${srcdir}/cargo" \
110 --output "${srcdir}/session-candidate" \
111 --strip-program /usr/bin/strip
112}
113
114check() {
115 cd niri-fx || return
116 env -u NIRI_SOCKET -u WAYLAND_DISPLAY -u DISPLAY -u DBUS_SESSION_BUS_ADDRESS \
117 -u PYTHONPATH -u PYTHONHOME PYTHONNOUSERSITE=1 \
118 python -m unittest discover -s tests
119 desktop-file-validate "${srcdir}/niri-fx-studio.desktop"
120 # DesktopNames is a login-session key rejected by the application validator.
121 PYTHONPATH="${srcdir}/niri-fx" python - "${srcdir}/niri-fx-packaged.desktop" <<'PYTHON'
122import sys
123from pathlib import Path
124from niri_fx.package_session import DESKTOP_ENTRY
125
126if Path(sys.argv[1]).read_bytes() != DESKTOP_ENTRY:
127 raise SystemExit("Packaged chooser entry differs from the runtime contract")
128PYTHON
129 test -f "${srcdir}/session-candidate/manifest.json"
130 test -x "${srcdir}/session-candidate/bin/niri"
131}
132
133package() {
134 cd niri-fx || return
135 python -m installer --destdir="${pkgdir}" dist/*.whl
136 install -Dm644 "${srcdir}/niri-fx-studio.desktop" \
137 "${pkgdir}/usr/share/applications/niri-fx-studio.desktop"
138 install -Dm644 niri_fx/assets/niri-fx.svg \
139 "${pkgdir}/usr/share/icons/hicolor/scalable/apps/niri-fx.svg"
140
141 local _candidate="${pkgdir}/usr/lib/niri-fx/session-candidate"
142 # Build attempts are private; installed candidates must be system-readable.
143 install -d "${_candidate}/bin" "${_candidate}/source" "${_candidate}/patches"
144 install -m755 "${srcdir}/session-candidate/bin/niri" "${_candidate}/bin/niri"
145 install -m644 "${srcdir}/session-candidate/manifest.json" "${_candidate}/manifest.json"
146 install -m644 "${srcdir}/session-candidate/source/"{Cargo.lock,LICENSE,README.md} \
147 -t "${_candidate}/source"
148 install -m644 "${srcdir}/session-candidate/patches/"*.patch -t "${_candidate}/patches"
149 install -Dm755 niri_fx/package_session.py "${pkgdir}/usr/bin/niri-fx-session"
150 install -Dm644 "${srcdir}/niri-fx-packaged.desktop" \
151 "${pkgdir}/usr/share/wayland-sessions/niri-fx-packaged.desktop"
152
153 install -Dm644 LICENSE THIRD_PARTY.md experimental/COPYING-NIRI \
154 -t "${pkgdir}/usr/share/licenses/${pkgname}"
155 install -Dm644 "${srcdir}/niri/LICENSE" \
156 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.niri"
157 install -Dm644 "${srcdir}/LICENSE" \
158 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.packaging"
159 install -Dm644 "${srcdir}/README.Arch" \
160 "${pkgdir}/usr/share/doc/niri-fx/README.Arch"
161 install -Dm644 examples/profiles/*.json \
162 -t "${pkgdir}/usr/share/doc/niri-fx/examples"
163}
164

Scan history

Scanned at (UTC)SeverityRules
2026-10-06 08:02:16 Low 2

Report a package

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

0 / 4000
Your suggestion