Merge pull request #91050 from primeos/rav1e-cargo-c

Add cargo-c and a C-API for rav1e
This commit is contained in:
Michael Weiss
2020-08-11 16:22:47 +02:00
committed by GitHub
3 changed files with 59 additions and 2 deletions

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";