diff --git a/srcpkgs/gesso/template b/srcpkgs/gesso/template new file mode 100644 index 00000000000000..fc437e50f534e0 --- /dev/null +++ b/srcpkgs/gesso/template @@ -0,0 +1,41 @@ +# Template file for 'gesso' +pkgname=gesso +version=0.1.3 +revision=1 +build_style=cargo +hostmakedepends="pkg-config" +makedepends="wayland-devel wayland-protocols" +short_desc="Deterministic Wayland wallpaper daemon and CLI" +maintainer="Dustin Pilgrim " +license="MIT" +homepage="https://github.com/saltnpepper97/gesso" +distfiles="https://github.com/saltnpepper97/gesso/archive/refs/tags/v${version}.tar.gz" +checksum=01f8306202af5c953f13d62af2bda0ce2825cd37d677535dc024808df89a3d3b + +# Upstream has no test suite yet, and running `cargo test` in the Void build sandbox +# is not useful for this package: the project is a Wayland wallpaper daemon/CLI and +# any future integration tests would require a live Wayland compositor/session which +# is not available during package builds. +make_check=no + +do_install() { + vlicense LICENSE + + # Find the built binaries reliably (works for native + cross) + local tdir="${CARGO_TARGET_DIR:-$wrksrc/target}" + + local gesso_bin + local gessod_bin + + gesso_bin=$(find "$tdir" -type f -path "*/release/gesso" -perm -111 | head -n1) + gessod_bin=$(find "$tdir" -type f -path "*/release/gessod" -perm -111 | head -n1) + + if [ -z "$gesso_bin" ] || [ -z "$gessod_bin" ]; then + msg_error "Could not find built binaries in $tdir (looked for */release/gesso and */release/gessod)" + fi + + vbin "$gesso_bin" + vbin "$gessod_bin" + + vman gesso.1 +}