159e378cbb
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ buildGo123Module, fetchFromGitHub, lib, installShellFiles }:
|
|
|
|
buildGo123Module rec {
|
|
pname = "golangci-lint";
|
|
version = "1.61.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "golangci";
|
|
repo = "golangci-lint";
|
|
rev = "v${version}";
|
|
hash = "sha256-2YzVNOdasal27R92l6eVdeS81mAp0ZU6kYsC/Jfvkcg=";
|
|
};
|
|
|
|
vendorHash = "sha256-mFDCRxbLq08yRd0ko3CCPJD2BZiCB0Gwd1g+/1oR6w8=";
|
|
|
|
subPackages = [ "cmd/golangci-lint" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.version=${version}"
|
|
"-X main.commit=v${version}"
|
|
"-X main.date=19700101-00:00:00"
|
|
];
|
|
|
|
postInstall = ''
|
|
for shell in bash zsh fish; 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/";
|
|
changelog = "https://github.com/golangci/golangci-lint/blob/v${version}/CHANGELOG.md";
|
|
mainProgram = "golangci-lint";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ SuperSandro2000 mic92 ];
|
|
};
|
|
}
|