mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
34 lines
1.0 KiB
Nix
34 lines
1.0 KiB
Nix
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "ab-av1";
|
|
version = "0.7.17";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "alexheretic";
|
|
repo = "ab-av1";
|
|
rev = "v${version}";
|
|
hash = "sha256-QPelXqJT3zbVP+lNiczrCR+JD4icimSyCravlIwTAyw=";
|
|
};
|
|
|
|
cargoHash = "sha256-7h1Hbtsk0pnoPXX5sFfzcZoH/sqcb0YTpmJp6yCzTG0=";
|
|
|
|
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 = 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;
|
|
maintainers = [ ];
|
|
mainProgram = "ab-av1";
|
|
};
|
|
}
|