{ lib , buildGoModule , fetchFromGitHub , installShellFiles }: let pname = "lefthook"; version = "1.8.1"; in buildGoModule { inherit pname version; src = fetchFromGitHub { owner = "evilmartians"; repo = "lefthook"; rev = "v${version}"; hash = "sha256-a4fghI3iUPnfYSQUR5LoH0eQfSqRMTcW4umeb/PhDt4="; }; vendorHash = "sha256-dxL+t5tPL+vsiBk+ojtQKcNubO0A72+7DWblxXiwzPE="; nativeBuildInputs = [ installShellFiles ]; ldflags = [ "-s" "-w" ]; doCheck = false; postInstall = '' installShellCompletion --cmd lefthook \ --bash <($out/bin/lefthook completion bash) \ --fish <($out/bin/lefthook completion fish) \ --zsh <($out/bin/lefthook completion zsh) ''; meta = { description = "Fast and powerful Git hooks manager for any type of projects"; homepage = "https://github.com/evilmartians/lefthook"; changelog = "https://github.com/evilmartians/lefthook/raw/v${version}/CHANGELOG.md"; license = lib.licenses.mit; mainProgram = "lefthook"; maintainers = with lib.maintainers; [ AndersonTorres ]; }; }