blob: f8933e0763d50f3e1bdb01edf0235b2a28e92598 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let
pname = "lefthook";
version = "1.7.12";
in
buildGoModule {
inherit pname version;
src = fetchFromGitHub {
owner = "evilmartians";
repo = "lefthook";
rev = "v${version}";
hash = "sha256-lPjxd3a97abPUJxazgL+BQmGOMqF9RlP/6qEgjS5aXw=";
};
vendorHash = "sha256-YrBFcRQoqZPe/USZj3oJK5KR7y0LimCVGS9w4uNMG6M=";
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;
mainProgram = "lefthook";
maintainers = with lib.maintainers; [ AndersonTorres ];
};
}
|