2024-07-10 11:52:28 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv }:
|
2024-04-19 04:20:00 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "ab-av1";
|
2024-11-09 04:52:01 +00:00
|
|
|
version = "0.7.19";
|
2024-04-19 04:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alexheretic";
|
|
|
|
repo = "ab-av1";
|
|
|
|
rev = "v${version}";
|
2024-11-09 04:52:01 +00:00
|
|
|
hash = "sha256-5gDPbljvy5Kp3s+oo5LkI0rUR2zSVK2wDh4k2HrsLFc=";
|
2024-04-19 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
2024-11-09 04:52:01 +00:00
|
|
|
cargoHash = "sha256-MIZGAlcBeQ03ScleOcM0WxgQEfjpFbRq1dK1/PjZbCQ=";
|
2024-04-19 04:20:00 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-07-10 11:52:28 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
2024-04-19 04:20:00 +00:00
|
|
|
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 = with lib; {
|
|
|
|
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 = licenses.mit;
|
2024-04-24 04:20:00 +00:00
|
|
|
maintainers = [ ];
|
2024-04-19 04:20:00 +00:00
|
|
|
mainProgram = "ab-av1";
|
|
|
|
};
|
|
|
|
}
|