vhs: use finalAttrs pattern

This commit is contained in:
Pol Dellaiera
2026-02-04 17:02:24 +01:00
parent e24922cbe9
commit d33d3428c8
+7 -7
View File
@@ -10,14 +10,14 @@
makeBinaryWrapper,
}:
buildGoModule rec {
buildGoModule (finalAttrs: {
pname = "vhs";
version = "0.10.0";
src = fetchFromGitHub {
owner = "charmbracelet";
repo = "vhs";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-ZnE5G8kfj7qScsT+bZg90ze4scpUxeC6xF8dAhdUUCo=";
};
@@ -31,17 +31,17 @@ buildGoModule rec {
ldflags = [
"-s"
"-w"
"-X=main.Version=${version}"
"-X=main.Version=${finalAttrs.version}"
];
postInstall = ''
wrapProgram $out/bin/vhs --prefix PATH : ${
lib.makeBinPath (
lib.optionals stdenv.hostPlatform.isLinux [ chromium ]
++ [
[
ffmpeg
ttyd
]
++ lib.optionals stdenv.hostPlatform.isLinux [ chromium ]
)
}
''
@@ -58,8 +58,8 @@ buildGoModule rec {
description = "Tool for generating terminal GIFs with code";
mainProgram = "vhs";
homepage = "https://github.com/charmbracelet/vhs";
changelog = "https://github.com/charmbracelet/vhs/releases/tag/v${version}";
changelog = "https://github.com/charmbracelet/vhs/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = [ ];
};
}
})