Package Details: diffr 0.1.5-3

Git Clone URL: (read-only, click to copy)
Package Base: diffr
Description: Word-by-word diff highlighting tool
Upstream URL:
Licenses: MIT
Conflicts: diffr-git
Submitter: wezm
Maintainer: vasya
Last Packager: vasya
Votes: 4
Popularity: 0.000000
First Submitted: 2019-07-02 22:08 (UTC)
Last Updated: 2023-12-27 07:50 (UTC)

Dependencies (2)

Required by (0)

Sources (1)

Latest Comments

vasya commented on 2023-12-27 07:51 (UTC)

Thanks @SRChiP! Added.

SRChiP commented on 2023-12-26 07:37 (UTC)

Works on aarch64

vasya commented on 2023-08-07 11:23 (UTC)

Hi @drbb, thanks for reporting! I've fixed it.

Background info: the latest release 0.1.5 just doesn't have the relevant files yet:

The current master branch already has it, so waiting for when it gets released to get the additional man page.

drbb commented on 2023-08-07 08:43 (UTC)

Building fails:

==> Starting build()...
   Compiling libc v0.2.58
   Compiling termcolor v1.1.0
   Compiling atty v0.2.11
   Compiling diffr v0.1.5 (/home/dario/.cache/yay/diffr/src/diffr-0.1.5)
    Finished release [optimized + debuginfo] target(s) in 3.14s
pandoc: assets/ openBinaryFile: does not exist (No such file or directory)
==> ERROR: A failure occurred in build().
 -> error making: diffr-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
diffr - exit status 4

I had to comment out lines 32-34 in PKGBUILD to make it work:

 #if command -v pandoc &> /dev/null; then
 #  pandoc -s -t man assets/ -o assets/diffr.1

vasya commented on 2023-08-02 18:12 (UTC)

UPD: fixed the tests following @qubidt's suggestions below (didn't notice them at first). Also, included optional manual page generation. (PKGBUILD's official syntax doesn't have optmakedepends, so I've added it to optdepends. This trade-off is subjective and I've also documented it in the PKGBUILD itself.)

vasya commented on 2023-08-02 17:35 (UTC)

Hi all, I've adopted the package now, and upgraded to the latest version 0.1.5. If anything's broken, do write.

I've added the cargo test statement in check() at first, following the Rust package guidelines:
However, the tests fail at least on my system. If anyone knows how to repair them, please write. The upstream code also has a few compilation warnings, so some of it is likely upstream tech debt. If anyone wants to help with raising issue/triaging, you're most welcome.

The resulting binary is working.

qubidt commented on 2023-06-23 19:16 (UTC)

Updated for v0.1.5, added the man page, and running the tests in check.

diff --git a/PKGBUILD b/PKGBUILD
index 8e2c327..ea9e192 100644
@@ -1,23 +1,51 @@
 # Maintainer: Wesley Moore <>

 pkgdesc='Word-by-word diff highlighting tool'
 arch=('i686' 'x86_64')
-makedepends=('rust' 'cargo' 'git')
+makedepends=('rust' 'cargo' 'git' 'pandoc')
+        # man page added in this PR, not yet included in a release
+        "PR-89.patch::${url}/pull/89.patch")
+            '91ec399544cde80cd565ed5ab375a28c3e641c25ce426975d9f5e4f95028ae72')
+prepare() {
+  cd "${pkgname}-${pkgver}"
+  patch -Np1 -i "${srcdir}/PR-89.patch"
+  export RUSTUP_TOOLCHAIN=stable
+  cargo fetch --locked --target "${CARCH}-unknown-linux-gnu"
+build() {
+  cd "${pkgname}-${pkgver}"
+  export RUSTUP_TOOLCHAIN=stable
+  export CARGO_TARGET_DIR=target
+  cargo build --release --frozen
+check() {
+  cd "${pkgname}-${pkgver}"
+  export RUSTUP_TOOLCHAIN=stable
+  export CARGO_TARGET_DIR=target
+  cargo test --release --frozen

 build() {
-  cd "$pkgname-$pkgver"
+  cd "${pkgname}-${pkgver}"
   cargo build --release
+  pandoc -s -t man assets/ -o assets/diffr.1

 package() {
-  install -Dm755 "$srcdir/$pkgname-$pkgver/target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
-  install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname"
+  cd "${pkgname}-${pkgver}"
+  install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+  install -Dm644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+  install -Dm644 "assets/diffr.1" "${pkgdir}/usr/share/man/man1/diffr.1"