1 { lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromGitHub {
11 hash = "sha256-n8yclhjeEkkge9xHuM4ZW+7aubIiLWwxCmmGTI1bE9I=";
14 cargoHash = "sha256-Rn+y1W2Cimt5JrD2dLmvLmZshxyLO7N+oIALwGjxhvM=";
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";