depot/third_party/nixpkgs/pkgs/applications/version-management/git-and-tools/lefthook/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

36 lines
1 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "lefthook";
version = "1.0.5";
src = fetchFromGitHub {
rev = "v${version}";
owner = "evilmartians";
repo = "lefthook";
sha256 = "sha256-/y9UUVwJ/u1F9+hMxWqGENscTuf8GP4VZl7hTk3zyrM=";
};
vendorSha256 = "sha256-LCBQyVSkUywceIlioYRNuRc6FrbPKuhgfw5OocR3NvI=";
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 ];
};
}