From 649f0ed1a88f6e4cf00705b1cb2f1fbdf1fb780c Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Tue, 17 Aug 2021 22:55:39 +0100 Subject: [PATCH] ffmpeg: enable basic tests --- pkgs/development/libraries/ffmpeg/2.8.nix | 1 + pkgs/development/libraries/ffmpeg/generic.nix | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/2.8.nix b/pkgs/development/libraries/ffmpeg/2.8.nix index 6d94c2e9974b..0df810ff10b0 100644 --- a/pkgs/development/libraries/ffmpeg/2.8.nix +++ b/pkgs/development/libraries/ffmpeg/2.8.nix @@ -7,4 +7,5 @@ callPackage ./generic.nix (rec { knownVulnerabilities = [ "CVE-2021-30123" ]; + doCheck = false; } // args) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index d52abd4ab09f..aa7de6944cf7 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -17,7 +17,8 @@ # Darwin frameworks , Cocoa, darwinFrameworks ? [ Cocoa ] # Inherit generics -, branch, sha256, version, patches ? [], knownVulnerabilities ? [], ... +, branch, sha256, version, patches ? [], knownVulnerabilities ? [] +, doCheck ? true, ... }: /* Maintainer notes: @@ -187,7 +188,13 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - doCheck = false; # fails + inherit doCheck; + checkPhase = let + ldLibraryPathEnv = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + in '' + ${ldLibraryPathEnv}="libavcodec:libavdevice:libavfilter:libavformat:libavresample:libavutil:libpostproc:libswresample:libswscale:''${${ldLibraryPathEnv}}" \ + make check -j$NIX_BUILD_CORES + ''; # ffmpeg 3+ generates pkg-config (.pc) files that don't have the # form automatically handled by the multiple-outputs hooks.