1 { lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromGitHub {
11 hash = "sha256-5gDPbljvy5Kp3s+oo5LkI0rUR2zSVK2wDh4k2HrsLFc=";
14 cargoHash = "sha256-MIZGAlcBeQ03ScleOcM0WxgQEfjpFbRq1dK1/PjZbCQ=";
16 nativeBuildInputs = [ installShellFiles ];
18 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
19 installShellCompletion --cmd ab-av1 \
20 --bash <($out/bin/ab-av1 print-completions bash) \
21 --fish <($out/bin/ab-av1 print-completions fish) \
22 --zsh <($out/bin/ab-av1 print-completions zsh)
26 description = "AV1 re-encoding using ffmpeg, svt-av1 & vmaf";
27 homepage = "https://github.com/alexheretic/ab-av1";
28 changelog = "https://github.com/alexheretic/ab-av1/blob/${src.rev}/CHANGELOG.md";
29 license = licenses.mit;
31 mainProgram = "ab-av1";