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-07-27 06:49:29 +00:00
|
|
|
version = "1.7.4";
|
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-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-KrTQrHPDDFCo9XG/wrY9ZNFpch12nMLg5CWYddV2OfA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
vendorHash = "sha256-ralnfqrP6R58Wjc/AWRf1motWZICPagZxHCkqVcwYoo=";
|
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
|
|
|
}
|