From c8b076cb07e9a55e3d3389e3253a5f6715300cb1 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 24 Aug 2025 15:00:36 +0200 Subject: [PATCH] libwebp: set meta.pkgConfigModules Using the package from the pkgs fixpoint instead of finalAttrs.finalPackage to mirror the other tests which also (indirectly) use pkgs.libwebp. Slight disadvantage of this is that it's not possible to test overridden variants of libwebp this way. --- pkgs/by-name/li/libwebp/package.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/by-name/li/libwebp/package.nix b/pkgs/by-name/li/libwebp/package.nix index 9eb826d4061d..b814308b8ae0 100644 --- a/pkgs/by-name/li/libwebp/package.nix +++ b/pkgs/by-name/li/libwebp/package.nix @@ -29,6 +29,8 @@ opencv, python3, vips, + testers, + libwebp, }: stdenv.mkDerivation rec { @@ -79,6 +81,7 @@ stdenv.mkDerivation rec { ; inherit (python3.pkgs) pillow imread; haskell-webp = haskellPackages.webp; + pkg-config = testers.hasPkgConfigModules { package = libwebp; }; }; meta = with lib; { @@ -87,5 +90,15 @@ stdenv.mkDerivation rec { license = licenses.bsd3; platforms = platforms.all; maintainers = with maintainers; [ ajs124 ]; + pkgConfigModules = [ + # configure_pkg_config() calls for these are unconditional + "libwebp" + "libwebpdecoder" + "libwebpdemux" + "libsharpyuv" + ] + ++ lib.optionals libwebpmuxSupport [ + "libwebpmux" + ]; }; }