mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 10:23:29 +00:00
f8c4a98e8e
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"([Tt]he)? ' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Tt]he (.)/\1\U\2/'
49 lines
1.0 KiB
Nix
49 lines
1.0 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, testers
|
|
, nix-update-script
|
|
, go-critic
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "go-critic";
|
|
version = "0.11.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "go-critic";
|
|
repo = "go-critic";
|
|
rev = "v${version}";
|
|
hash = "sha256-v/7fc3MRQoMQCKqZQVuZEm5R9ha5wusN+hEzp7aBpNk=";
|
|
};
|
|
|
|
vendorHash = "sha256-Qw4t2v/5IZnpZX8sR26DL0SYrjvfuJSzDUpZ4G0u6hU=";
|
|
|
|
subPackages = [
|
|
"cmd/gocritic"
|
|
];
|
|
|
|
allowGoReference = true;
|
|
|
|
ldflags = [
|
|
"-X main.Version=${version}"
|
|
];
|
|
|
|
passthru = {
|
|
tests.version = testers.testVersion {
|
|
package = go-critic;
|
|
command = "gocritic version";
|
|
};
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Most opinionated Go source code linter for code audit";
|
|
homepage = "https://go-critic.com/";
|
|
changelog = "https://github.com/go-critic/go-critic/releases/tag/${src.rev}";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "gocritic";
|
|
maintainers = with lib.maintainers; [ katexochen ];
|
|
};
|
|
}
|