# Template file for 'niri'
pkgname=niri
version=25.01
revision=1
build_style=cargo
configure_args="--no-default-features --features dbus,xdp-gnome-screencast"
hostmakedepends="pkg-config clang18-devel"
makedepends="eudev-libudev-devel libxkbcommon-devel libinput-devel libgbm-devel
 libdisplay-info-devel pipewire-devel pango-devel libseat-devel clang18-devel"
short_desc="Scrollable-tiling Wayland compositor"
maintainer="joetroll <joetroll@proton.me>"
license="GPL-3.0-or-later"
homepage="https://github.com/YaLTeR/niri"
changelog="https://github.com/YaLTeR/niri/releases"
distfiles="https://github.com/YaLTeR/niri/archive/refs/tags/v${version}.tar.gz"
checksum=86b89bcfc3fc6a8ed81f9e3f0ac7a29bd30267515efb2c19e1e0bc2ccd67b649

pre_check() {
	export XDG_RUNTIME_DIR=$(mktemp -d "$wrksrc/runtime.XXXXXX")
}

post_install() {
	vinstall resources/niri.desktop 644 usr/share/wayland-sessions
	vinstall resources/niri-portals.conf 644 usr/share/xdg-desktop-portal
}
