Merge pull request #134726 from risicle/ris-ffmpeg-tests

ffmpeg, ffmpeg-full: enable basic tests
This commit is contained in:
Luke Granger-Brown 2021-08-21 03:42:11 +01:00 committed by GitHub
commit f355e8a060
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 2 deletions

View File

@ -447,6 +447,14 @@ stdenv.mkDerivation rec {
buildFlags = [ "all" ]
++ optional qtFaststartProgram "tools/qt-faststart"; # Build qt-faststart executable
doCheck = true;
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
'';
# Hacky framework patching technique borrowed from the phantomjs2 package
postInstall = optionalString qtFaststartProgram ''
cp -a tools/qt-faststart $out/bin/

View File

@ -7,4 +7,5 @@ callPackage ./generic.nix (rec {
knownVulnerabilities = [
"CVE-2021-30123"
];
doCheck = false;
} // args)

View File

@ -18,7 +18,8 @@
# Darwin frameworks
, Cocoa, darwinFrameworks ? [ Cocoa ]
# Inherit generics
, branch, sha256, version, patches ? [], knownVulnerabilities ? [], ...
, branch, sha256, version, patches ? [], knownVulnerabilities ? []
, doCheck ? true, ...
}:
/* Maintainer notes:
@ -189,7 +190,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.