# Copyright 2026 Aubrey
# Distributed under the terms of the BSD-2-Clause License

EAPI=8

inherit cargo

BDEPEND="dev-lang/rust-bin"

DESCRIPTION="A simple Unix-style reminder utility"
HOMEPAGE="https://codeberg.org/kelseythedreamer/due-notes"
SRC_URI="https://codeberg.org/kelseythedreamer/due-notes/archive/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/due-notes"

LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND=""

src_unpack() {
	default
}

src_configure() {
	:
}

src_compile() {
	export CARGO_HOME="${WORKDIR}/cargo_home"
	mkdir -p "${CARGO_HOME}" || die
	cargo build --release || die "cargo build failed"
}

src_install() {
	dobin target/release/due
	dodoc README.md
}