From 7024a01211d9d0a4f8ab138a611349c37ac5a537 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 18 Jun 2020 18:17:54 +0200 Subject: rav1e: Build and install C-compatible libraries This is required for AV1 encoding support via librav1e in FFmpeg 4.3: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d8bf24459b694338de4ceb2a2e6d4d2949d6658d --- pkgs/tools/video/rav1e/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'pkgs/tools/video') diff --git a/pkgs/tools/video/rav1e/default.nix b/pkgs/tools/video/rav1e/default.nix index b8e43fe4f10f..f8d547b0285c 100644 --- a/pkgs/tools/video/rav1e/default.nix +++ b/pkgs/tools/video/rav1e/default.nix @@ -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"; -- cgit v1.2.3