9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
43 lines
1 KiB
Nix
43 lines
1 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
let
|
|
pname = "lefthook";
|
|
version = "1.4.4";
|
|
in
|
|
buildGoModule rec {
|
|
inherit pname version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "evilmartians";
|
|
repo = "lefthook";
|
|
rev = "v${version}";
|
|
hash = "sha256-YVnf+ieYnvNQkw6W2gPBFiZLknaBknptv4ltvGKdw04=";
|
|
};
|
|
|
|
vendorHash = "sha256-QKprfszbWqegvIJ2J+f3gxLpkpZgfuLP5HjoMwyCi5M=";
|
|
|
|
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;
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
};
|
|
}
|