rav1e: Build and install C-compatible libraries

This is required for AV1 encoding support via librav1e in FFmpeg 4.3:
d8bf24459b
This commit is contained in:
Michael Weiss 2020-06-18 18:17:54 +02:00
parent 2608e52664
commit 7024a01211
No known key found for this signature in database
GPG Key ID: 5BE487C4D4771D83

View File

@ -1,4 +1,4 @@
{ rustPlatform, fetchFromGitHub, lib, nasm }:
{ rustPlatform, fetchFromGitHub, lib, nasm, cargo-c }:
rustPlatform.buildRustPackage rec {
pname = "rav1e";
@ -13,7 +13,15 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "1xaincrmpicp0skf9788w5631x1hxvifvq06hh5ribdz79zclzx3";
nativeBuildInputs = [ nasm ];
nativeBuildInputs = [ nasm cargo-c ];
postBuild = ''
cargo cbuild --release --frozen --prefix=${placeholder "out"}
'';
postInstall = ''
cargo cinstall --release --frozen --prefix=${placeholder "out"}
'';
meta = with lib; {
description = "The fastest and safest AV1 encoder";