3
0
Fork 0
forked from mirrors/nixpkgs

golangci-lint: install completions

This commit is contained in:
Mario Rodas 2020-07-08 04:20:00 -05:00
parent bf76f25248
commit c94a2de710

View file

@ -1,4 +1,4 @@
{ buildGoModule, fetchFromGitHub, lib }:
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
buildGoModule rec {
pname = "golangci-lint";
@ -14,6 +14,15 @@ buildGoModule rec {
vendorSha256 = "0dg3rjzkvzh4n7r4kp68qhg96ijqks9hkz1cjcc02xa38ygma7gz";
subPackages = [ "cmd/golangci-lint" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash zsh; do
HOME=$TMPDIR $out/bin/golangci-lint completion $shell > golangci-lint.$shell
installShellCompletion golangci-lint.$shell
done
'';
meta = with lib; {
description = "Linters Runner for Go. 5x faster than gometalinter. Nice colored output.";
homepage = "https://golangci.com/";