{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "lefthook"; version = "1.3.7"; src = fetchFromGitHub { rev = "v${version}"; owner = "evilmartians"; repo = "lefthook"; hash = "sha256-6wVzl2hu6bH2dqB/m/kgUQxRxOxMQltcGlo/TIIgh/Y="; }; vendorHash = "sha256-cMRl+TqSLlfoAja+JNaNKfHDR9fkvMTWdB1FT3XxPd4="; 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 = with lib; { 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 = licenses.mit; maintainers = with maintainers; [ rencire ]; }; }