Package Details: lefthook 1.10.1-1

Git Clone URL: https://aur.archlinux.org/lefthook.git (read-only, click to copy)
Package Base: lefthook
Description: Git hooks manager
Upstream URL: https://github.com/evilmartians/lefthook
Keywords: git hooks manager
Licenses: MIT
Submitter: Envek
Maintainer: Envek (mrexox)
Last Packager: mrexox
Votes: 4
Popularity: 0.000400
First Submitted: 2019-05-07 11:42 (UTC)
Last Updated: 2024-12-26 09:49 (UTC)

Dependencies (1)

Required by (1)

Sources (1)

Latest Comments

mrexox commented on 2024-12-23 14:48 (UTC)

Thank you for reporting! The issues must be fixed with 1.10.0-3 revision.

simona commented on 2024-12-23 11:53 (UTC)

/home/simona/.cache/yay/lefthook/PKGBUILD: riga 15: cd: lefthook-1.10.0: File o directory non esistente

0x4F72 commented on 2024-12-22 12:03 (UTC)

Following the 1.10.0-1 update I encounter a checksum error when trying to build this package. The v1.10.0.tar.gz has a 57b0382ad049a1ee6e8e07b314f41c1c27bf03aa9c86191b10722a4fe7c7ba22 checksum, while the 651b27d53002aa7d3bfce5bdb687628786693422fe0fcd01e247ef471097c49d, used in the PKGBUILD, seem to belong to the https://github.com/evilmartians/lefthook/releases/download/v1.10.0/lefthook_source.tar.gz artifact. Can you check, please?

Envek commented on 2024-02-29 06:16 (UTC)

Thanks for the links! Applied build command from the current Go package guidelines.

me44ic05 commented on 2024-02-28 12:11 (UTC)

Lefthook builds started failing for me recently. Running makepkg gives the following:

flag provided but not defined: -flto
usage: link [options] main.o

I was able to fix this with the following diff

diff --git a/PKGBUILD b/PKGBUILD
index 2e36120..6b1684b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,11 +13,14 @@ sha256sums=('5fbd046e2ac1c6b9b2a966ad6d174827f36e0f1dd82a20b609cb8c23a0d81632')

 build() {
   cd "$pkgname-$pkgver"
-  go build \
-    -gcflags "all=-trimpath=${PWD}" \
-    -asmflags "all=-trimpath=${PWD}" \
-    -ldflags "-extldflags ${LDFLAGS}" \
-    .
+
+  export CGO_CPPFLAGS="${CPPFLAGS}"
+  export CGO_CFLAGS="${CFLAGS}"
+  export CGO_CXXFLAGS="${CXXFLAGS}"
+  export CGO_LDFLAGS="${LDFLAGS}"
+  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+  go build -o .
 }

Based on the Arch Wiki's Go Package Guidelines. Seems some other packages have occasionally had similar errors and done similar things to resolve:

  1. i3keys, fix
  2. dashing, fix
  3. virtwold, fix