38 lines
1022 B
Nix
38 lines
1022 B
Nix
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "golangci-lint";
|
|
version = "1.35.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "golangci";
|
|
repo = "golangci-lint";
|
|
rev = "v${version}";
|
|
sha256 = "03pg8qfysjdbpxzdcs4y5cn0gshr5k53p7rjqak7q8vdykva60s1";
|
|
};
|
|
|
|
vendorSha256 = "18dgx087jixwcfcab546qhy5qq1n1ahrsr7i7d7d3v9vklslics8";
|
|
|
|
doCheck = false;
|
|
|
|
subPackages = [ "cmd/golangci-lint" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version} -X main.commit=${src.rev} -X main.date=19700101-00:00:00" ];
|
|
|
|
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 = "Fast linters Runner for Go";
|
|
homepage = "https://golangci-lint.run/";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ anpryl manveru ];
|
|
};
|
|
}
|