--- /dev/null
+EAPI=8
+
+# Live ebuild uses git-r3, release uses tarball
+inherit cargo systemd
+
+DESCRIPTION="Inhibit Wayland idle when audio is playing through PipeWire"
+HOMEPAGE="https://github.com/rafaelrc7/wayland-pipewire-idle-inhibit"
+
+# --- Source selection ---
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/rafaelrc7/wayland-pipewire-idle-inhibit.git"
+else
+ # Release tarball
+ SRC_URI="https://github.com/rafaelrc7/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+
+DEPEND="
+ dev-libs/wayland
+ dev-libs/wayland-protocols
+ media-video/pipewire
+"
+RDEPEND="${DEPEND}"
+BDEPEND=""
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ fi
+ cargo_src_unpack
+ cargo_live_src_unpack
+}
+
+src_install() {
+ cargo_src_install
+ systemd_douserunit wayland-pipewire-idle-inhibit.service
+}