vhs: use finalAttrs pattern (#486956)
This commit is contained in:
@@ -7,17 +7,17 @@
|
||||
ffmpeg,
|
||||
ttyd,
|
||||
chromium,
|
||||
makeWrapper,
|
||||
makeBinaryWrapper,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "vhs";
|
||||
version = "0.10.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "charmbracelet";
|
||||
repo = "vhs";
|
||||
rev = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-ZnE5G8kfj7qScsT+bZg90ze4scpUxeC6xF8dAhdUUCo=";
|
||||
};
|
||||
|
||||
@@ -25,23 +25,23 @@ buildGoModule rec {
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
makeWrapper
|
||||
makeBinaryWrapper
|
||||
];
|
||||
|
||||
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 = [ ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user