2020-06-18 16:17:54 +00:00
|
|
|
{ rustPlatform, fetchFromGitHub, lib, nasm, cargo-c }:
|
2019-12-14 18:18:31 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rav1e";
|
2020-09-09 13:48:09 +00:00
|
|
|
version = "0.3.4";
|
2019-12-14 18:18:31 +00:00
|
|
|
|
2020-06-08 18:01:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xiph";
|
|
|
|
repo = "rav1e";
|
|
|
|
rev = "v${version}";
|
2020-09-09 13:48:09 +00:00
|
|
|
sha256 = "0zwjg0sv504i1ahzfy2jgng6qwmyvcrvdrp4n3s90r4kvwjkv8xs";
|
2019-12-14 18:18:31 +00:00
|
|
|
};
|
|
|
|
|
2020-09-09 13:48:09 +00:00
|
|
|
cargoSha256 = "1mfzshcbxky27nskxhcyrj99wd3v5f597ymgv7nb67lzp5lsyb24";
|
2019-12-14 18:18:31 +00:00
|
|
|
|
2020-06-18 16:17:54 +00:00
|
|
|
nativeBuildInputs = [ nasm cargo-c ];
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
cargo cbuild --release --frozen --prefix=${placeholder "out"}
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cargo cinstall --release --frozen --prefix=${placeholder "out"}
|
|
|
|
'';
|
2019-12-14 18:18:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The fastest and safest AV1 encoder";
|
|
|
|
longDescription = ''
|
|
|
|
rav1e is an AV1 video encoder. It is designed to eventually cover all use
|
|
|
|
cases, though in its current form it is most suitable for cases where
|
|
|
|
libaom (the reference encoder) is too slow.
|
|
|
|
Features: https://github.com/xiph/rav1e#features
|
|
|
|
'';
|
2020-06-13 15:15:25 +00:00
|
|
|
inherit (src.meta) homepage;
|
2020-05-29 19:16:25 +00:00
|
|
|
changelog = "https://github.com/xiph/rav1e/releases/tag/v${version}";
|
2019-12-14 18:18:31 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = [ maintainers.primeos ];
|
|
|
|
};
|
|
|
|
}
|