Skip to content

Commit

Permalink
Merge pull request #205 from eza-community/cafk-itest-no-gif
Browse files Browse the repository at this point in the history
disable gif rendering in itests
  • Loading branch information
cafkafk authored Sep 6, 2023
2 parents 32c84a7 + 126d74f commit 724b6dd
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
38 changes: 37 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,47 @@
mode = "clippy";
inherit buildInputs;
};

vhs = pkgs.buildGoModule rec {
pname = "vhs";
version = "0.6.0";

src = pkgs.fetchFromGitHub {
owner = "PThorpe92";
repo = pname;
rev = "70ff84c3b192a2f3379adf56dd873c63bc8163ac";
hash = "sha256-QgE9XpJKZSJDjY2Z2GC1ndWgwXOJaB1fzvGUGFFf5XM=";
};

vendorHash = "sha256-zugGnhLrqqqVjMFZrO4rrSj3UzyHWpLra1rxyGG2ga4=";

nativeBuildInputs = with pkgs; [installShellFiles makeWrapper];

ldflags = ["-s" "-w" "-X=main.Version=${version}"];

postInstall = ''
wrapProgram $out/bin/vhs --prefix PATH : ${pkgs.lib.makeBinPath (pkgs.lib.optionals pkgs.stdenv.isLinux [pkgs.chromium] ++ [pkgs.ffmpeg pkgs.ttyd])}
$out/bin/vhs man > vhs.1
installManPage vhs.1
installShellCompletion --cmd vhs \
--bash <($out/bin/vhs completion bash) \
--fish <($out/bin/vhs completion fish) \
--zsh <($out/bin/vhs completion zsh)
'';

meta = with pkgs.lib; {
description = "A tool for generating terminal GIFs with code";
homepage = "https://github.com/charmbracelet/vhs";
changelog = "https://github.com/charmbracelet/vhs/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [cafkafk];
};
};
};

# For `nix develop`:
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [toolchain just pandoc vhs convco];
nativeBuildInputs = with pkgs; [toolchain just pandoc packages.vhs convco];
};

# For `nix flake check`
Expand Down
2 changes: 2 additions & 0 deletions tests/tapes/eza-blocksize.tape
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Output outfile

Set DisableRender true

Set Shell fish
Sleep 2s

Expand Down
2 changes: 2 additions & 0 deletions tests/tapes/eza-long.tape
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Output outfile

Set DisableRender true

Set Shell fish
Sleep 2s

Expand Down
2 changes: 2 additions & 0 deletions tests/tapes/main.tape
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Output outfile

Set DisableRender true

Set Shell fish
Sleep 2s
Type "cargo run -q -- -l --no-user --no-time --no-filesize"
Expand Down

0 comments on commit 724b6dd

Please sign in to comment.