2025-07-26 11:39:35 +02:00

40 lines
1.1 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
stdenv,
}:
rustPlatform.buildRustPackage rec {
pname = "ab-av1";
version = "0.10.1";
src = fetchFromGitHub {
owner = "alexheretic";
repo = "ab-av1";
tag = "v${version}";
hash = "sha256-uW5BXUNzk94bqSWQSaCiuSO8Angwt0eo4ZmvGRr/4S8=";
};
cargoHash = "sha256-oLmE+xkatgIDIu6mUJ49O9s6ULp0bvpWdBP8rEGb5yc=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd ab-av1 \
--bash <($out/bin/ab-av1 print-completions bash) \
--fish <($out/bin/ab-av1 print-completions fish) \
--zsh <($out/bin/ab-av1 print-completions zsh)
'';
meta = {
description = "AV1 re-encoding using ffmpeg, svt-av1 & vmaf";
homepage = "https://github.com/alexheretic/ab-av1";
changelog = "https://github.com/alexheretic/ab-av1/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ];
mainProgram = "ab-av1";
};
}