Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / le / lefthook / package.nix
blob1df8d82650e5908f95af04554df4cf655c8710f2
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , installShellFiles
5 }:
7 let
8   pname = "lefthook";
9   version = "1.7.4";
11 buildGoModule {
12   inherit pname version;
14   src = fetchFromGitHub {
15     owner = "evilmartians";
16     repo = "lefthook";
17     rev = "v${version}";
18     hash = "sha256-KrTQrHPDDFCo9XG/wrY9ZNFpch12nMLg5CWYddV2OfA=";
19   };
21   vendorHash = "sha256-ralnfqrP6R58Wjc/AWRf1motWZICPagZxHCkqVcwYoo=";
23   nativeBuildInputs = [ installShellFiles ];
25   ldflags = [ "-s" "-w" ];
27   doCheck = false;
29   postInstall = ''
30     installShellCompletion --cmd lefthook \
31       --bash <($out/bin/lefthook completion bash) \
32       --fish <($out/bin/lefthook completion fish) \
33       --zsh <($out/bin/lefthook completion zsh)
34   '';
36   meta = {
37     description = "Fast and powerful Git hooks manager for any type of projects";
38     homepage = "https://github.com/evilmartians/lefthook";
39     changelog = "https://github.com/evilmartians/lefthook/raw/v${version}/CHANGELOG.md";
40     license = lib.licenses.mit;
41     mainProgram = "lefthook";
42     maintainers = with lib.maintainers; [ AndersonTorres ];
43   };