1 { lib, stdenv, buildGoModule, installShellFiles, fetchFromGitHub, ffmpeg, ttyd, chromium, makeWrapper }:
7 src = fetchFromGitHub {
8 owner = "charmbracelet";
11 hash = "sha256-kUsh+jy4dXYW1uAUfFv/HKBqIIyVogLKUYNjBhIKlls=";
14 vendorHash = "sha256-1UBhiRemJ+dQNm20+8pbOJus5abvTwVcuzxNMzrniN8=";
16 nativeBuildInputs = [ installShellFiles makeWrapper ];
18 ldflags = [ "-s" "-w" "-X=main.Version=${version}" ];
21 wrapProgram $out/bin/vhs --prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.hostPlatform.isLinux [ chromium ] ++ [ ffmpeg ttyd ])}
22 $out/bin/vhs man > vhs.1
24 installShellCompletion --cmd vhs \
25 --bash <($out/bin/vhs completion bash) \
26 --fish <($out/bin/vhs completion fish) \
27 --zsh <($out/bin/vhs completion zsh)
31 description = "Tool for generating terminal GIFs with code";
33 homepage = "https://github.com/charmbracelet/vhs";
34 changelog = "https://github.com/charmbracelet/vhs/releases/tag/v${version}";
35 license = licenses.mit;
36 maintainers = with maintainers; [ maaslalani penguwin ];