2022-08-12 12:06:08 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "lefthook";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.2.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
2021-04-25 03:57:28 +00:00
|
|
|
owner = "evilmartians";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "lefthook";
|
2022-12-17 10:02:37 +00:00
|
|
|
sha256 = "sha256-Z6j/Y8b9lq2nYS5Ki8iJoDsG3l5M6RylfDqQL7WrwNg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
vendorSha256 = "sha256-sBcgt2YsV9RQhSjPN6N54tRk7nNvcOVhPEsEP+0Dtco=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd lefthook \
|
|
|
|
--bash <($out/bin/lefthook completion bash) \
|
|
|
|
--fish <($out/bin/lefthook completion fish) \
|
|
|
|
--zsh <($out/bin/lefthook completion zsh)
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Fast and powerful Git hooks manager for any type of projects";
|
2022-08-12 12:06:08 +00:00
|
|
|
homepage = "https://github.com/evilmartians/lefthook";
|
|
|
|
changelog = "https://github.com/evilmartians/lefthook/raw/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ rencire ];
|
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|