
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
67 lines
1.4 KiB
Nix
67 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildGoModule,
|
|
installShellFiles,
|
|
fetchFromGitHub,
|
|
ffmpeg,
|
|
ttyd,
|
|
chromium,
|
|
makeWrapper,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "vhs";
|
|
version = "0.9.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "charmbracelet";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-ceY4zLd+4EwXpwunKiWnaAB25qutSK1b1SyIriAbAI0=";
|
|
};
|
|
|
|
vendorHash = "sha256-2vRAI+Mm8Pzk3u4rndtwYnUlrAtjffe0kpoA1EHprQk=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
makeWrapper
|
|
];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=main.Version=${version}"
|
|
];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/vhs --prefix PATH : ${
|
|
lib.makeBinPath (
|
|
lib.optionals stdenv.hostPlatform.isLinux [ chromium ]
|
|
++ [
|
|
ffmpeg
|
|
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 lib; {
|
|
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}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [
|
|
maaslalani
|
|
penguwin
|
|
];
|
|
};
|
|
}
|