fa5436e0a7
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
let
|
|
pname = "lefthook";
|
|
version = "1.6.14";
|
|
in
|
|
buildGoModule {
|
|
inherit pname version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "evilmartians";
|
|
repo = "lefthook";
|
|
rev = "v${version}";
|
|
hash = "sha256-forbMU7KiPWtO79XMAuckt5wzJFQehqAZ5IYNv6Tr7I=";
|
|
};
|
|
|
|
vendorHash = "sha256-M5lIfgUYMwLJu5NB54aZLofEegZiW+AUoSaVOul1ud8=";
|
|
|
|
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 ];
|
|
};
|
|
}
|