niri-fx

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

The package builds from source (niri-fx and niri) via Git repositories with SKIP'd checksums, which is normal for VCS packages; it applies patches and runs Python/Rust build scripts from the project's own codebase, which is expected behavior for this type of compositor package.

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 (niri-fx and niri) via Git repositories with SKIP'd checksums, which is normal for VCS packages; it applies patches and runs Python/Rust build scripts from the project's own codebase, which is expected behavior for this type of compositor package.

PKGBUILD

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

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