buf: use finalAttrs (#421156)

This commit is contained in:
Pol Dellaiera 2025-06-30 07:33:22 +02:00 committed by GitHub
commit a9dfc8261f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,18 +5,17 @@
protobuf,
git,
testers,
buf,
installShellFiles,
}:
buildGoModule rec {
buildGoModule (finalAttrs: {
pname = "buf";
version = "1.55.1";
src = fetchFromGitHub {
owner = "bufbuild";
repo = "buf";
rev = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-41IY2P2s9kCV6aQh5vg7xVmu4Ovl9gakGmgcI/QSwfw=";
};
@ -81,11 +80,11 @@ buildGoModule rec {
runHook postInstall
'';
passthru.tests.version = testers.testVersion { package = buf; };
passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
meta = {
homepage = "https://buf.build";
changelog = "https://github.com/bufbuild/buf/releases/tag/v${version}";
changelog = "https://github.com/bufbuild/buf/releases/tag/v${finalAttrs.version}";
description = "Create consistent Protobuf APIs that preserve compatibility and comply with design best-practices";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
@ -95,4 +94,4 @@ buildGoModule rec {
];
mainProgram = "buf";
};
}
})