nixpkgs/pkgs/by-name/le/lefthook/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let
pname = "lefthook";
2024-10-01 18:21:33 +00:00
version = "1.7.17";
in
2024-01-27 20:53:04 +00:00
buildGoModule {
inherit pname version;
src = fetchFromGitHub {
owner = "evilmartians";
repo = "lefthook";
rev = "v${version}";
2024-10-01 18:21:33 +00:00
hash = "sha256-r7Tss0NHdEfjfDunWSTxpaV1B5KHGYu0xj9nnyhk8tQ=";
};
2024-09-09 19:26:26 +00:00
vendorHash = "sha256-rJdtax3r5Nwew+ptY4kIAUtxqPguwrFMMRk78zrZUcU=";
2022-07-30 04:20:00 +00:00
nativeBuildInputs = [ installShellFiles ];
ldflags = [ "-s" "-w" ];
doCheck = false;
2022-07-30 04:20:00 +00:00
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";
2022-07-30 04:20:00 +00:00
homepage = "https://github.com/evilmartians/lefthook";
changelog = "https://github.com/evilmartians/lefthook/raw/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
2023-08-05 17:31:16 +00:00
mainProgram = "lefthook";
maintainers = with lib.maintainers; [ AndersonTorres ];
};
}