Skip to content

Commit 24a74cc

Browse files
committed
buf: use finalAttrs
1 parent 9ab56f9 commit 24a74cc

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

pkgs/by-name/bu/buf/package.nix

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,17 @@
55
protobuf,
66
git,
77
testers,
8-
buf,
98
installShellFiles,
109
}:
1110

12-
buildGoModule rec {
11+
buildGoModule (finalAttrs: {
1312
pname = "buf";
1413
version = "1.55.1";
1514

1615
src = fetchFromGitHub {
1716
owner = "bufbuild";
1817
repo = "buf";
19-
rev = "v${version}";
18+
tag = "v${finalAttrs.version}";
2019
hash = "sha256-41IY2P2s9kCV6aQh5vg7xVmu4Ovl9gakGmgcI/QSwfw=";
2120
};
2221

@@ -81,11 +80,11 @@ buildGoModule rec {
8180
runHook postInstall
8281
'';
8382

84-
passthru.tests.version = testers.testVersion { package = buf; };
83+
passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
8584

8685
meta = {
8786
homepage = "https://buf.build";
88-
changelog = "https://github.com/bufbuild/buf/releases/tag/v${version}";
87+
changelog = "https://github.com/bufbuild/buf/releases/tag/v${finalAttrs.version}";
8988
description = "Create consistent Protobuf APIs that preserve compatibility and comply with design best-practices";
9089
license = lib.licenses.asl20;
9190
maintainers = with lib.maintainers; [
@@ -95,4 +94,4 @@ buildGoModule rec {
9594
];
9695
mainProgram = "buf";
9796
};
98-
}
97+
})

0 commit comments

Comments
 (0)