diff --git a/srcpkgs/dprint/template b/srcpkgs/dprint/template new file mode 100644 index 00000000000000..3de9b32ccebfcc --- /dev/null +++ b/srcpkgs/dprint/template @@ -0,0 +1,27 @@ +# Template file for 'dprint' +pkgname=dprint +version=0.64.3 +revision=1 +build_style=cargo +build_helper="qemu" +make_install_args="--path crates/dprint" +# test tries to use "ps" which is not in PATH +make_check_args="-- --skip gets_process_ids" +hostmakedepends="pkg-config" +makedepends="libzstd-devel" +short_desc="Code formatting platform that unifies different formatters" +maintainer="Bnyro " +license="MIT" +homepage="https://dprint.dev" +changelog="https://github.com/dprint/dprint/releases" +distfiles="https://github.com/dprint/dprint/archive/refs/tags/${version}.tar.gz" +checksum=5aca2a32a9a69fa2a6d0abf7732f1ce394a93d239fbd0e3e82982b90f77d8f19 + +post_install() { + vlicense LICENSE + + for sh in bash fish zsh; do + vtargetrun "${DESTDIR}/usr/bin/dprint" completions "$sh" > "dprint.$sh" + vcompletion "dprint.$sh" "$sh" + done +}