Skip to content

Commit

Permalink
golangci-lint: install completions
Browse files Browse the repository at this point in the history
  • Loading branch information
marsam committed Jul 8, 2020
1 parent bf76f25 commit c94a2de
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkgs/development/tools/golangci-lint/default.nix
@@ -1,4 +1,4 @@
{ buildGoModule, fetchFromGitHub, lib }:
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:

buildGoModule rec {
pname = "golangci-lint";
Expand All @@ -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/";
Expand Down

0 comments on commit c94a2de

Please sign in to comment.