01ed8ef136
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
36 lines
1 KiB
Nix
36 lines
1 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "lefthook";
|
|
version = "1.2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
rev = "v${version}";
|
|
owner = "evilmartians";
|
|
repo = "lefthook";
|
|
sha256 = "sha256-ZMqqiPSNNJw9t3p5h/GUHa9cvl9LcJ4u0HMf1ag8qCc=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-NTZz0EDIjGdh8dD9jxbNVdWb7NFJsdtnMp7H6Ni0EbQ=";
|
|
|
|
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 = with lib; {
|
|
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 = licenses.mit;
|
|
maintainers = with maintainers; [ rencire ];
|
|
};
|
|
}
|