94427deb9d
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
43 lines
1 KiB
Nix
43 lines
1 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
let
|
|
pname = "lefthook";
|
|
version = "1.4.0";
|
|
in
|
|
buildGoModule rec {
|
|
inherit pname version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "evilmartians";
|
|
repo = "lefthook";
|
|
rev = "v${version}";
|
|
hash = "sha256-nov/0iPlMsqFWh//0Mc7JVNiLzX1I0qmkey0fkm+2k8=";
|
|
};
|
|
|
|
vendorHash = "sha256-dWJ8B51zk3uhe8j60wP0PJz/4YhAL7OJbk/96eoLdSs=";
|
|
|
|
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 ];
|
|
};
|
|
}
|