diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-12 15:05:20 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-13 10:24:53 -0500 |
commit | 796313656cd9b5e2d0915f89f41c129d3f58f193 (patch) | |
tree | b720752defb2e62cd49508b5b1c38c72e2976080 /pkgs/development/libraries/ffmpeg/generic.nix | |
parent | ee2fd1e5108433cc5bba3d0bc9d7667ed1346014 (diff) | |
download | nixpkgs-796313656cd9b5e2d0915f89f41c129d3f58f193.tar nixpkgs-796313656cd9b5e2d0915f89f41c129d3f58f193.tar.gz nixpkgs-796313656cd9b5e2d0915f89f41c129d3f58f193.tar.bz2 nixpkgs-796313656cd9b5e2d0915f89f41c129d3f58f193.tar.lz nixpkgs-796313656cd9b5e2d0915f89f41c129d3f58f193.tar.xz nixpkgs-796313656cd9b5e2d0915f89f41c129d3f58f193.tar.zst nixpkgs-796313656cd9b5e2d0915f89f41c129d3f58f193.zip |
ffmpeg: Add `meta.pkgConfigModules` and test
Diffstat (limited to 'pkgs/development/libraries/ffmpeg/generic.nix')
-rw-r--r-- | pkgs/development/libraries/ffmpeg/generic.nix | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index dceada0f7f8..d0374c74901 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -266,6 +266,10 @@ , MediaToolbox , VideoDecodeAcceleration , VideoToolbox +/* + * Testing + */ +, testers }: /* Maintainer notes: @@ -321,13 +325,13 @@ assert buildAvformat -> buildAvcodec && buildAvutil; # configure flag since 0.6 assert buildPostproc -> buildAvutil; assert buildSwscale -> buildAvutil; -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ffmpeg" + (if ffmpegVariant == "small" then "" else "-${ffmpegVariant}"); inherit version; src = fetchgit { url = "https://git.ffmpeg.org/ffmpeg.git"; - rev = "n${version}"; + rev = "n${finalAttrs.version}"; inherit sha256; }; @@ -522,7 +526,7 @@ stdenv.mkDerivation rec { # outputs where we don't want them. Patch the generated config.h to remove all # such references except for data. postConfigure = let - toStrip = lib.remove "data" outputs; # We want to keep references to the data dir. + toStrip = lib.remove "data" finalAttrs.outputs; # We want to keep references to the data dir. in "remove-references-to ${lib.concatStringsSep " " (map (o: "-t ${placeholder o}") toStrip)} config.h"; @@ -656,6 +660,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { description = "A complete, cross-platform solution to record, convert and stream audio and video"; homepage = "https://www.ffmpeg.org/"; @@ -671,7 +677,8 @@ stdenv.mkDerivation rec { ++ optional withGPL gpl2Plus ++ optional withGPLv3 gpl3Plus ++ optional withUnfree unfreeRedistributable; + pkgConfigModules = [ "libavutil" ]; platforms = platforms.all; maintainers = with maintainers; [ atemu ]; }; -} +}) |