mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
golangci-lint: install completions
This commit is contained in:
parent
bf76f25248
commit
c94a2de710
@ -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/";
|
||||
|
Loading…
Reference in New Issue
Block a user