void-packages/srcpkgs/starship/template

39 lines
1.0 KiB
Bash

# Template file for 'starship'
pkgname=starship
version=0.48.0
revision=1
build_style=cargo
build_helper=qemu
hostmakedepends="pkg-config"
makedepends="libgit2-devel"
checkdepends="git fish-shell"
short_desc="Minimal, fast and customizable cross-shell prompt"
maintainer="Aluísio Augusto Silva Gonçalves <aluisio@aasg.name>"
license="ISC"
homepage="https://starship.rs"
distfiles="https://github.com/starship/starship/archive/v${version}.tar.gz"
checksum=23e729ace48ec0bf6d8eff5f99003351463841f3b28fe453faceb62e6f99bae6
post_build() {
STARSHIP="target/${RUST_TARGET}/release/starship"
vtargetrun ${STARSHIP} completions zsh >starship.zsh
vtargetrun ${STARSHIP} completions bash >starship.bash
vtargetrun ${STARSHIP} completions fish >starship.fish
}
do_check() {
mkdir -p fake-home
local OLDHOME=$HOME
export HOME=$(pwd)/fake-home
cargo test -q --release --target ${RUST_TARGET}
export HOME=$OLDHOME
}
post_install() {
vcompletion starship.bash bash
vcompletion starship.fish fish
vcompletion starship.zsh zsh
vlicense LICENSE
}