termshot: use finalAttrs pattern

This commit is contained in:
Defelo
2025-03-17 00:38:09 +05:30
committed by Masum Reza
parent 629494c10a
commit 554d906cb9
+6 -5
View File
@@ -5,14 +5,15 @@
versionCheckHook,
nix-update-script,
}:
buildGoModule rec {
buildGoModule (finalAttrs: {
pname = "termshot";
version = "0.4.1";
src = fetchFromGitHub {
owner = "homeport";
repo = "termshot";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-vkxOUo1RyzZBN2+wRn8yWV930HrKRJnPwpHnxza5GNE=";
};
@@ -21,7 +22,7 @@ buildGoModule rec {
ldflags = [
"-s"
"-w"
"-X github.com/homeport/termshot/internal/cmd.version=${version}"
"-X github.com/homeport/termshot/internal/cmd.version=${finalAttrs.version}"
];
checkFlags = [ "-skip=^TestPtexec$" ];
@@ -35,9 +36,9 @@ buildGoModule rec {
meta = {
description = "Creates screenshots based on terminal command output";
homepage = "https://github.com/homeport/termshot";
changelog = "https://github.com/homeport/termshot/releases/tag/v${version}";
changelog = "https://github.com/homeport/termshot/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ defelo ];
mainProgram = "termshot";
};
}
})