Re: Requesting niri wayland compositor.
Reply #3 –
@Dudemanguy
Thank you for adding Niri to the World repo.
What do you think of modifying the PKGBUILD to compile with dinit support? I created this by referencing Chimera's repo.
pkgname=niri
pkgver=0.1.10
pkgrel=1
pkgdesc="A scrollable-tiling Wayland compositor"
arch=(x86_64)
url="https://github.com/YaLTeR/niri"
license=(GPL-3.0-or-later)
depends=(
cairo
dinit
gcc-libs
glib2
glibc
libdisplay-info
libinput
libpipewire
libxkbcommon
mesa
pango
pixman
seatd
xdg-desktop-portal-impl
)
makedepends=(
clang
rust
)
optdepends=(
'alacritty: a suggested GPU-accelerated terminal emulator'
'bash: for niri-session script'
'fuzzel: a suggested Wayland application launcher'
'mako: a suggested Wayland notification daemon'
'org.freedesktop.secrets: for apps to rely on secrets portal'
'swaybg: a suggested Wayland wallpaper tool'
'waybar: a suggested Wayland customizable desktop bar'
'waylock: a suggested Wayland screen locker'
'xdg-desktop-portal-gtk: a suggested XDG desktop portal'
'xdg-desktop-portal-gnome: a XDG desktop portal required for screencasting'
)
# NOTE: linking issues with LTO enabled
options=(!lto)
source=($pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz)
sha512sums=('e596e7113f05fd160ff123225e76abf13ac1157d267e9d479ab2e52c38268b478eb7efe0d300a89bdab031f8efe35a28608eda8757671dce6de1d411c2bbdf93')
b2sums=('46d671684019e875042680cf6062b2037ef682dfa5fe918b41fcd8228a806d3d9034321b911854bda58a7a496f4c368b68d54bfe7ec5be0fbbd4abf942eaf1d7')
prepare() {
cd $pkgname-$pkgver
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd $pkgname-$pkgver
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --no-default-features --features dbus,dinit,xdp-gnome-screencast
}
check() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo test --all --exclude niri-visual-tests --frozen
}
package() {
cd $pkgname-$pkgver
install -vDm 755 {target/release/$pkgname,resources/$pkgname-session} -t "$pkgdir/usr/bin/"
install -vDm 644 resources/dinit/{$pkgname,$pkgname-shutdown} -t "$pkgdir/usr/lib/dinit.d/user/"
install -vDm 644 resources/$pkgname.desktop -t "$pkgdir/usr/share/wayland-sessions/"
install -vDm 644 resources/$pkgname-portals.conf -t "$pkgdir/usr/share/xdg-desktop-portal/"
install -vDm 644 resources/default-config.kdl README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}