2020-01-04 11:02:56 -08:00
|
|
|
{ rustPlatform, fetchFromGitHub, fetchurl, stdenv, lib, nasm }:
|
2019-12-14 10:18:31 -08:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rav1e";
|
2020-02-07 05:51:59 -08:00
|
|
|
version = "0.3.0";
|
2019-12-14 10:18:31 -08:00
|
|
|
|
|
|
|
src = stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}-${version}-source";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xiph";
|
|
|
|
repo = "rav1e";
|
|
|
|
rev = "v${version}";
|
2020-02-07 05:51:59 -08:00
|
|
|
sha256 = "1z8wdwhmczd7qq61gpngnyhl9614csccm0vnavvzjmaqsljlm0qi";
|
2019-12-14 10:18:31 -08:00
|
|
|
};
|
|
|
|
cargoLock = fetchurl {
|
2020-01-04 11:02:56 -08:00
|
|
|
url = "https://github.com/xiph/rav1e/releases/download/v${version}/Cargo.lock";
|
2020-02-07 05:51:59 -08:00
|
|
|
sha256 = "0qhgiryb71qgil5nawy7n3mj5g9aiikl3hq3nlikg94rm9dl0dhv";
|
2019-12-14 10:18:31 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R ./* $out/
|
2020-01-04 11:02:56 -08:00
|
|
|
cp ${cargoLock} $out/Cargo.lock
|
2019-12-14 10:18:31 -08:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2020-02-13 18:00:26 -08:00
|
|
|
# Delete this on next update; see #79975 for details
|
|
|
|
legacyCargoFetcher = true;
|
|
|
|
|
2020-02-07 05:51:59 -08:00
|
|
|
cargoSha256 = "185jnmyirfhrv8bxvmwizf3lvq49sjj1696g3gflph31d8bfpb0c";
|
2019-12-14 10:18:31 -08: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;
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = [ maintainers.primeos ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|