depot/third_party/nixpkgs/pkgs/applications/version-management/lefthook/default.nix
Default email 410b979fe2 Project import generated by Copybara.
GitOrigin-RevId: a64e169e396460d6b5763a1de1dd197df8421688
2023-03-24 01:07:29 +01:00

36 lines
1,021 B
Nix

{ 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 ];
};
}