Skip to content

Commit 7f20d5e

Browse files
committed
go-critic: use finalAttrs
Signed-off-by: Paul Meyer <[email protected]>
1 parent 51af7d6 commit 7f20d5e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkgs/by-name/go/go-critic/package.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
go-critic,
88
}:
99

10-
buildGoModule rec {
10+
buildGoModule (finalAttrs: {
1111
pname = "go-critic";
1212
version = "0.13.0";
1313

1414
src = fetchFromGitHub {
1515
owner = "go-critic";
1616
repo = "go-critic";
17-
rev = "v${version}";
17+
rev = "v${finalAttrs.version}";
1818
hash = "sha256-0AOhq7OhSHub4I6XXL018hg6i2ERkIbZCrO9osNjvHw=";
1919
};
2020

@@ -27,7 +27,7 @@ buildGoModule rec {
2727
allowGoReference = true;
2828

2929
ldflags = [
30-
"-X main.Version=${version}"
30+
"-X main.Version=${finalAttrs.version}"
3131
];
3232

3333
passthru = {
@@ -41,9 +41,9 @@ buildGoModule rec {
4141
meta = {
4242
description = "Most opinionated Go source code linter for code audit";
4343
homepage = "https://go-critic.com/";
44-
changelog = "https://github.com/go-critic/go-critic/releases/tag/${src.rev}";
44+
changelog = "https://github.com/go-critic/go-critic/releases/tag/${finalAttrs.src.rev}";
4545
license = lib.licenses.mit;
4646
mainProgram = "gocritic";
4747
maintainers = with lib.maintainers; [ katexochen ];
4848
};
49-
}
49+
})

0 commit comments

Comments
 (0)