2020-01-04 19:02:56 +00:00
|
|
|
{ rustPlatform, fetchFromGitHub, fetchurl, stdenv, lib, nasm }:
|
2019-12-14 18:18:31 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rav1e";
|
2020-05-29 20:16:25 +01:00
|
|
|
version = "0.3.2";
|
2019-12-14 18:18:31 +00:00
|
|
|
|
|
|
|
src = stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}-${version}-source";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xiph";
|
|
|
|
repo = "rav1e";
|
|
|
|
rev = "v${version}";
|
2020-05-29 20:16:25 +01:00
|
|
|
sha256 = "0qqw397yfglwj9kg45imhx1p5bb0nsx2gkaxj4lcc9i1hav6ia43";
|
2019-12-14 18:18:31 +00:00
|
|
|
};
|
|
|
|
cargoLock = fetchurl {
|
2020-01-04 19:02:56 +00:00
|
|
|
url = "https://github.com/xiph/rav1e/releases/download/v${version}/Cargo.lock";
|
2020-05-29 20:16:25 +01:00
|
|
|
sha256 = "1kdr3q97vq3mip1h7iv2iy9qzlgb69y6nwjzbw9nfi7dl7ip6q3l";
|
2019-12-14 18:18:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R ./* $out/
|
2020-01-04 19:02:56 +00:00
|
|
|
cp ${cargoLock} $out/Cargo.lock
|
2019-12-14 18:18:31 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2020-05-29 20:16:25 +01:00
|
|
|
cargoSha256 = "03zsvavk7wskz843qxwwcymhclarcp6nfxwa1mwna3nmzvlm1hwb";
|
2019-12-14 18:18:31 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ nasm ];
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
inherit (src.src.meta) homepage;
|
2020-05-29 20:16:25 +01: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 ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|