go-critic: use finalAttrs

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
This commit is contained in:
Paul Meyer 2025-04-11 13:02:33 +02:00
parent 51af7d609d
commit 7f20d5e29a

View file

@ -7,14 +7,14 @@
go-critic, go-critic,
}: }:
buildGoModule rec { buildGoModule (finalAttrs: {
pname = "go-critic"; pname = "go-critic";
version = "0.13.0"; version = "0.13.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "go-critic"; owner = "go-critic";
repo = "go-critic"; repo = "go-critic";
rev = "v${version}"; rev = "v${finalAttrs.version}";
hash = "sha256-0AOhq7OhSHub4I6XXL018hg6i2ERkIbZCrO9osNjvHw="; hash = "sha256-0AOhq7OhSHub4I6XXL018hg6i2ERkIbZCrO9osNjvHw=";
}; };
@ -27,7 +27,7 @@ buildGoModule rec {
allowGoReference = true; allowGoReference = true;
ldflags = [ ldflags = [
"-X main.Version=${version}" "-X main.Version=${finalAttrs.version}"
]; ];
passthru = { passthru = {
@ -41,9 +41,9 @@ buildGoModule rec {
meta = { meta = {
description = "Most opinionated Go source code linter for code audit"; description = "Most opinionated Go source code linter for code audit";
homepage = "https://go-critic.com/"; homepage = "https://go-critic.com/";
changelog = "https://github.com/go-critic/go-critic/releases/tag/${src.rev}"; changelog = "https://github.com/go-critic/go-critic/releases/tag/${finalAttrs.src.rev}";
license = lib.licenses.mit; license = lib.licenses.mit;
mainProgram = "gocritic"; mainProgram = "gocritic";
maintainers = with lib.maintainers; [ katexochen ]; maintainers = with lib.maintainers; [ katexochen ];
}; };
} })