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-28 21:21:41 +00:00
|
|
|
version = "1.2.6";
|
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-28 21:21:41 +00:00
|
|
|
sha256 = "sha256-M15ESB8JCSryD6/+6N2EA6NUzLI4cwgAJUQC9UDNJrM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
vendorSha256 = "sha256-KNegRQhVZMNDgcJZOgEei3oviDPM/RFwZbpoh38pxBw=";
|
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
|
|
|
}
|