2023-04-12 12:48:02 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
let
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "lefthook";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.6.11";
|
2023-04-12 12:48:02 +00:00
|
|
|
in
|
2024-02-07 01:22:34 +00:00
|
|
|
buildGoModule {
|
2023-04-12 12:48:02 +00:00
|
|
|
inherit pname version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-04-25 03:57:28 +00:00
|
|
|
owner = "evilmartians";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "lefthook";
|
2023-04-12 12:48:02 +00:00
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-l94RysGILYju0u1jOIGxLVe/TECw1naMq9SzpYq6ooM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
vendorHash = "sha256-sDqP+fzAFavqtvJ98nwsD5+GxNhmLgtOkTzIK06wp9E=";
|
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)
|
|
|
|
'';
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
meta = {
|
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";
|
2023-04-12 12:48:02 +00:00
|
|
|
license = lib.licenses.mit;
|
2023-08-10 07:59:29 +00:00
|
|
|
mainProgram = "lefthook";
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|