Artix Linux Forum

Artix Linux => Package management => Topic started by: atlanelan on 13 January 2025, 00:40:44

Title: Requesting niri wayland compositor.
Post by: atlanelan on 13 January 2025, 00:40:44
Can we have niri, a scrollable-tiling Wayland compositor in artix repo please.
https://github.com/YaLTeR/niri.

Using niri from arch extra in artix. It would be nice to have our own build without any systemd libs. There is also a dinit integration method.
https://github.com/YaLTeR/niri/wiki/Packaging-niri


Title: Re: Requesting niri wayland compositor.
Post by: Dudemanguy on 13 January 2025, 04:56:45
Sure I just added this to our repos. We carry all of the other non-systemd dependencies anyway.
Title: Re: Requesting niri wayland compositor.
Post by: atlanelan on 15 January 2025, 08:18:19
Thanks for updating to latest version  @Dudemanguy  ;D
Title: Re: Requesting niri wayland compositor.
Post by: LandFill on 15 January 2025, 15:21:58
@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.

Code: [Select]
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/"
}
Title: Re: Requesting niri wayland compositor.
Post by: atlanelan on 15 January 2025, 23:44:35
I think
Code: [Select]
--no-default-features --features dbus,xdp-gnome-screencast
will be more ideal for artix which has four different init systems.
Title: Re: Requesting niri wayland compositor.
Post by: LandFill on 16 January 2025, 15:02:26
Then should we package the dinit services separately?

https://github.com/YaLTeR/niri/tree/main/resources
Title: Re: Requesting niri wayland compositor.
Post by: Dudemanguy on 18 January 2025, 17:09:32
Any init scripts should be packaged separately, yes. I'm not really familiar with how cargo works, but I assumed the default would autodetect all the features as appropriate.