From cb82409a84d83bdfd011c7b00b2060fe683a53e0 Mon Sep 17 00:00:00 2001 From: 0x5c Date: Fri, 20 May 2022 04:27:26 -0400 Subject: [PATCH] New package: csview-1.0.1 --- .../rust1.58_format-args-capture.patch | 15 +++++++++++++++ srcpkgs/csview/template | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 srcpkgs/csview/patches/rust1.58_format-args-capture.patch create mode 100644 srcpkgs/csview/template diff --git a/srcpkgs/csview/patches/rust1.58_format-args-capture.patch b/srcpkgs/csview/patches/rust1.58_format-args-capture.patch new file mode 100644 index 000000000000..ac38f311dd05 --- /dev/null +++ b/srcpkgs/csview/patches/rust1.58_format-args-capture.patch @@ -0,0 +1,15 @@ +Fix usage of format args capture, which is not supported on our rust version. + +-- + +--- a/src/table/row.rs ++++ b/src/table/row.rs +@@ -27,7 +27,7 @@ + .iter() + .zip(widths) + .map(|(cell, &width)| cell.unicode_pad(width, Alignment::Left, true)) +- .map(|s| format!("{:pad$}{s}{:pad$}", "", "", pad = fmt.padding)), ++ .map(|s| format!("{:pad$}{}{:pad$}", "", s, "", pad = fmt.padding)), + sep, + ) + .try_for_each(|s| write!(wtr, "{}", s))?; diff --git a/srcpkgs/csview/template b/srcpkgs/csview/template new file mode 100644 index 000000000000..375cba303289 --- /dev/null +++ b/srcpkgs/csview/template @@ -0,0 +1,19 @@ +# Template file for 'csview' +pkgname=csview +version=1.0.1 +revision=1 +build_style=cargo +short_desc="Pretty csv viewer for cli with cjk/emoji support" +maintainer="0x5c " +license="MIT, Apache-2.0" +homepage="https://github.com/wfxr/csview" +distfiles="https://github.com/wfxr/csview/archive/refs/tags/v${version}.tar.gz" +checksum=34df6838dd9407197511887cdc9b2a3ed08b4b508f9c6bb660def326ea953e8c + +post_install() { + vlicense LICENSE-MIT + vcompletion "completions/zsh/_csview" zsh csview + vcompletion "completions/bash/csview.bash" bash csview + vcompletion "completions/fish/csview.fish" fish csview + vinstall "completions/elvish/csview.elv" 644 "/usr/share/elvish/lib/" +}