Skip to content

Commit 724b6dd

Browse files
authored
Merge pull request eza-community#205 from eza-community/cafk-itest-no-gif
disable gif rendering in itests
2 parents 32c84a7 + 126d74f commit 724b6dd

File tree

4 files changed

+43
-1
lines changed

4 files changed

+43
-1
lines changed

flake.nix

+37-1
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,47 @@
108108
mode = "clippy";
109109
inherit buildInputs;
110110
};
111+
112+
vhs = pkgs.buildGoModule rec {
113+
pname = "vhs";
114+
version = "0.6.0";
115+
116+
src = pkgs.fetchFromGitHub {
117+
owner = "PThorpe92";
118+
repo = pname;
119+
rev = "70ff84c3b192a2f3379adf56dd873c63bc8163ac";
120+
hash = "sha256-QgE9XpJKZSJDjY2Z2GC1ndWgwXOJaB1fzvGUGFFf5XM=";
121+
};
122+
123+
vendorHash = "sha256-zugGnhLrqqqVjMFZrO4rrSj3UzyHWpLra1rxyGG2ga4=";
124+
125+
nativeBuildInputs = with pkgs; [installShellFiles makeWrapper];
126+
127+
ldflags = ["-s" "-w" "-X=main.Version=${version}"];
128+
129+
postInstall = ''
130+
wrapProgram $out/bin/vhs --prefix PATH : ${pkgs.lib.makeBinPath (pkgs.lib.optionals pkgs.stdenv.isLinux [pkgs.chromium] ++ [pkgs.ffmpeg pkgs.ttyd])}
131+
$out/bin/vhs man > vhs.1
132+
installManPage vhs.1
133+
installShellCompletion --cmd vhs \
134+
--bash <($out/bin/vhs completion bash) \
135+
--fish <($out/bin/vhs completion fish) \
136+
--zsh <($out/bin/vhs completion zsh)
137+
'';
138+
139+
meta = with pkgs.lib; {
140+
description = "A tool for generating terminal GIFs with code";
141+
homepage = "https://github.com/charmbracelet/vhs";
142+
changelog = "https://github.com/charmbracelet/vhs/releases/tag/v${version}";
143+
license = licenses.mit;
144+
maintainers = with maintainers; [cafkafk];
145+
};
146+
};
111147
};
112148

113149
# For `nix develop`:
114150
devShells.default = pkgs.mkShell {
115-
nativeBuildInputs = with pkgs; [toolchain just pandoc vhs convco];
151+
nativeBuildInputs = with pkgs; [toolchain just pandoc packages.vhs convco];
116152
};
117153

118154
# For `nix flake check`

tests/tapes/eza-blocksize.tape

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Output outfile
22

3+
Set DisableRender true
4+
35
Set Shell fish
46
Sleep 2s
57

tests/tapes/eza-long.tape

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Output outfile
22

3+
Set DisableRender true
4+
35
Set Shell fish
46
Sleep 2s
57

tests/tapes/main.tape

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Output outfile
22

3+
Set DisableRender true
4+
35
Set Shell fish
46
Sleep 2s
57
Type "cargo run -q -- -l --no-user --no-time --no-filesize"

0 commit comments

Comments
 (0)