1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 02:24:27 +00:00
nixpkgs/pkgs/development/tools/golangci-lint/default.nix
2020-11-11 07:50:32 +00:00

38 lines
1,022 B
Nix

{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
buildGoModule rec {
pname = "golangci-lint";
version = "1.32.2";
src = fetchFromGitHub {
owner = "golangci";
repo = "golangci-lint";
rev = "v${version}";
sha256 = "14zy8sq5bc26hxb3hg4afd7dpnrw25qi3g6v8y2p05isdf55laww";
};
vendorSha256 = "1l73qqpyn40z2czh2d8wgp3lpj6vnv8ll29yyryx0wm59ric732g";
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 ];
};
}